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
Labels
good first issue easy issue that is friendly to new contributor topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch

Comments

@nicoddemus
Copy link
Member

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 nicoddemus added type: enhancement new feature or API change, should be merged into features branch topic: reporting related to terminal output and user-facing messages and errors labels Apr 13, 2018
@nicoddemus
Copy link
Member Author

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

@nicoddemus nicoddemus added the good first issue easy issue that is friendly to new contributor label Apr 13, 2018
@pytestbot
Copy link
Contributor

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 commented Apr 13, 2018

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

@RonnyPfannschmidt
Copy link
Member

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

@nicoddemus
Copy link
Member Author

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

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
Labels
good first issue easy issue that is friendly to new contributor topic: reporting related to terminal output and user-facing messages and errors type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

4 participants