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

pytest --fixtures does not show fixtures with leading underscore #3398

Closed
nicoddemus opened this issue Apr 13, 2018 · 6 comments
Closed

pytest --fixtures does not show fixtures with leading underscore #3398

nicoddemus opened this issue Apr 13, 2018 · 6 comments

Comments

@nicoddemus
Copy link
Member

@nicoddemus nicoddemus commented Apr 13, 2018

Follow up of #3366.

We couldn't pinpoint the reason for this and it might confuse users, so we might as well remove this.

@nicoddemus
Copy link
Member Author

@nicoddemus nicoddemus commented Apr 13, 2018

@kohr-h would you like to contribute a PR?

@pytestbot
Copy link
Contributor

@pytestbot pytestbot commented Apr 13, 2018

GitMate.io thinks possibly related issues are #1132 (Pytest/capsys fixture not capturing stdout), #343 (pytest.fixture with a yield statement doesn't work as expected), #1849 (Pytest 3.0 does not accept empty list in fixture), #3366 (Plugin fixtures with leading underscore ignored outside project defining them), and #2043 (Pytest does not support indirect parameters for overriden fixtures).

@kohr-h
Copy link
Contributor

@kohr-h kohr-h commented Apr 13, 2018

Sure, why not. Apart from changing the code, is there any documentation / changelog update necessary?

@RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Apr 13, 2018

im -1 on removing it - id rather see it documented

@nicoddemus
Copy link
Member Author

@nicoddemus nicoddemus commented Apr 13, 2018

To play it safe? Works for me too. I think just adding a note in the docs and perhaps in the cmdline help ((use -v to show fixtures with leading underscores)) would be enough?

@RonnyPfannschmidt
Copy link
Member

@RonnyPfannschmidt RonnyPfannschmidt commented Apr 13, 2018

yup - bascailly _ at the start is python for "private" so i'd like to keep that

nicoddemus added a commit that referenced this issue Apr 16, 2018
Mention omission of fixtures with leading '_', closes #3398
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants