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

Confusing pytestmark documentation #2333

Closed
asmeurer opened this issue Mar 28, 2017 · 5 comments
Closed

Confusing pytestmark documentation #2333

asmeurer opened this issue Mar 28, 2017 · 5 comments

Comments

@asmeurer
Copy link

The pytestmark documentation at http://pytest.org/dev/skipping.html#skip-all-test-functions-of-a-class-or-module says:

@pytest.mark.skipif(sys.platform == 'win32',
                    reason="requires windows")
class TestPosixCalls:

    def test_function(self):
        "will not be setup or run under 'win32' platform"

The reason given is "requires windows", but if I understand the test correctly, it should be "requires POSIX".

@RonnyPfannschmidt
Copy link
Member

thats a wrong operator, i believe it should be !=
it would be a good contribution

@asmeurer
Copy link
Author

The class is called TestPosixCalls and the docstring says "will not be setup or run under 'win32' platform". If I understand skipif correctly, the operator is correct, but the reason is wrong.

@nicoddemus
Copy link
Member

nicoddemus commented Mar 28, 2017

That link is out of date, this has been fixed sometime ago already! 👍

Latest version: http://doc.pytest.org/en/latest/skipping.html#skip-all-test-functions-of-a-class-or-module

Where did you find that link btw? It seems like we are redirecting only pytest.org/latest to readthedocs.

@asmeurer
Copy link
Author

It's the fourth result from Googling "pytest skip". I see the first result is the right one, but I chose that one because of the "dev" in the URL. If those docs are out of date I would suggest removing them.

@nicoddemus
Copy link
Member

Agreed, thanks for pointing it out.

@RonnyPfannschmidt @hpk42 should we just remove them or redirect them as well?

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

No branches or pull requests

3 participants