Skip to content
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

Merged
merged 2 commits into from
Jul 10, 2020

Conversation

nicoddemus
Copy link
Member

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.

Also uses proper references in the CHANGELOG for #7466 as commented in #7466 (comment).

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:
Copy link
Member Author

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)
Copy link
Member Author

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.

@nicoddemus nicoddemus changed the title New doc role: globalvar for special variablesEnv vars docs New doc role: globalvar for special variables Jul 10, 2020
Copy link
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@nicoddemus nicoddemus merged commit cf648d9 into pytest-dev:master Jul 10, 2020
@nicoddemus nicoddemus deleted the env-vars-docs branch July 10, 2020 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants