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

Change --strict help message to clarify it deals with unregistered markers #2552

Merged

Conversation

nicoddemus
Copy link
Member

Fix #2444

cc @okken

@@ -576,7 +576,7 @@ def test_strict_and_skip(self, testdir):
def test_hello():
pass
""")
result = testdir.runpytest("-rs --strict")
Copy link
Member Author

Choose a reason for hiding this comment

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

Removed --strict from this test just because --strict doesn't really have anything to do with it.

Copy link
Member

Choose a reason for hiding this comment

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

I just stumbled upon this test while working on #8384. It seems to me that with this change, the test (test_strict_and_skip) doesn't test what it intended to test, and it seems equal to test_skip_no_reason now.

Looking at 1fbd19b, the intention of the test was to check whether the skip marker is correctly registered by pytest, so I think this should be readded as --strict-markers, no?

Copy link
Member Author

Choose a reason for hiding this comment

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

Good catch, thanks!

If you are working on #8384, would you mind doing that in the same PR?

@coveralls
Copy link

Coverage Status

Coverage remained the same at 92.138% when pulling 221f42c on nicoddemus:strict-help-message into b63f677 on pytest-dev:master.

@RonnyPfannschmidt RonnyPfannschmidt merged commit db24a3b into pytest-dev:master Jul 5, 2017
The-Compiler added a commit to The-Compiler/pytest that referenced this pull request Mar 3, 2021
The `--strict` argument was removed in pytest-dev#2552, but the removal wasn't
actually correct - see pytest-dev#1472.
@The-Compiler The-Compiler mentioned this pull request Mar 3, 2021
The-Compiler added a commit that referenced this pull request Mar 4, 2021
* Fix test_strict_and_skip

The `--strict` argument was removed in #2552, but the removal wasn't
actually correct - see #1472.

* Fix argument handling in pytest.mark.skip

See #8384

* Raise from None

* Fix test name
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

4 participants