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

Comments

Projects
None yet
4 participants
@nicoddemus
Copy link
Member

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

This comment has been minimized.

Copy link
Member Author

nicoddemus commented Apr 13, 2018

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

@pytestbot

This comment has been minimized.

Copy link

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

This comment has been minimized.

Copy link
Contributor

kohr-h commented Apr 13, 2018

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

@RonnyPfannschmidt

This comment has been minimized.

Copy link
Member

RonnyPfannschmidt commented Apr 13, 2018

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

@nicoddemus

This comment has been minimized.

Copy link
Member Author

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

This comment has been minimized.

Copy link
Member

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

Merge pull request #3401 from kohr-h/underscore_fixtures
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
You can’t perform that action at this time.