-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Pre-PR for warnings on unknown markers #5015
Conversation
44f4068
to
00810b9
Compare
Codecov Report
@@ Coverage Diff @@
## features #5015 +/- ##
============================================
+ Coverage 96.06% 96.06% +<.01%
============================================
Files 114 114
Lines 25749 25750 +1
Branches 2548 2548
============================================
+ Hits 24735 24736 +1
Misses 704 704
Partials 310 310
Continue to review full report at Codecov.
|
@@ -166,6 +166,8 @@ filterwarnings = | |||
# Do not cause SyntaxError for invalid escape sequences in py37. | |||
default:invalid escape sequence:DeprecationWarning | |||
pytester_example_dir = testing/example_scripts | |||
markers = | |||
issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/issue/gh_issue/ maybe?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already using issue
, so I'd rather leave any changes to a future PR and just standardise here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Well, a) I do not know how this is used actually, but b) you're touching all those lines already (and therefore it would be good to do it right away).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We're already using issue, so I'd rather leave any changes to a future PR and just standardise here.
I never used it myself. I think we can actually remove them in the future, unless someone steps up and mentions he/she uses it on their workflow.
Co-Authored-By: Zac-HD <[email protected]>
@@ -42,8 +40,10 @@ Marks can be registered in ``pytest.ini`` like this: | |||
slow | |||
serial | |||
|
|||
This can be used to prevent users mistyping mark names by accident. Test suites that want to enforce this | |||
should add ``--strict`` to ``addopts``: | |||
When the ``--strict`` command-line flag is passed, any unknown marks applied |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Zac-HD how about using this PR and add --strict-marks
as an alias to --strict
, while also updating the docs to use the former?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd prefer to leave functional changes to the other PR - will discuss there.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sure, thanks!
This pull request is designed to make #4935 much smaller and easier to work on (or review). The four commits each make a helpful change that is also worth doing independently.
pytester
was using an unregistered marker - adding it to the help is both useful for users and will avoid making usage a warning later.--strict
and marks.mark.issue
andmark.issueNNN
; standardising on the former makes selecting issue-relevant tests uniform - and means we won't need to register every number.I'm targeting
features
so that I can rebase #4935 as soon as this is merged 😄