-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
New doc role: globalvar for special variables #7474
Conversation
This introduces a new role, `:globalvar:`, so we can mark/reference variables like `pytest_plugins`, `pytestmark`, etc. This besides being useful also makes the documentation look more consistent.
@@ -280,37 +280,26 @@ its test methods: | |||
This is equivalent to directly applying the decorator to the | |||
two test functions. | |||
|
|||
Due to legacy reasons, it is possible to set the ``pytestmark`` attribute on a TestClass like this: |
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.
Moved this legacy note to the bottom, the text reads better this way.
@@ -971,12 +968,6 @@ test functions and methods. Can be either a single mark or a list of marks. | |||
|
|||
pytestmark = [pytest.mark.integration, pytest.mark.slow] | |||
|
|||
PYTEST_DONT_REWRITE (module docstring) |
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.
This is not really a global variable, and is already mentioned in detail in the assertion
chapter, so decided to remove this from here as it is pretty niche.
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.
Nice!
This introduces a new role,
:globalvar:
, so we can mark/reference variables likepytest_plugins
,pytestmark
, etc. This besides being useful also makes the documentation look more consistent.Also uses proper references in the CHANGELOG for #7466 as commented in #7466 (comment).