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

Unexpected display when running tests with sessions scoped fixtures #277

Open
kaki4am opened this issue Aug 24, 2023 · 0 comments
Open

Unexpected display when running tests with sessions scoped fixtures #277

kaki4am opened this issue Aug 24, 2023 · 0 comments

Comments

@kaki4am
Copy link

kaki4am commented Aug 24, 2023

I am running tests that all use the same session-scoped fixture. This fixture natively uses a number of parameters.

pytest first uses the first parameter of the fixture, runs all the tests with it, then switches to the second parameter of the fixture, runs all the test with it etc. For instance, with 5 tests and with 5 parameters in this fixture, using the fixture as session-scoped means 5 fixture executions, 5 fixture tear down, and 5 test executions. (using the fixture as function-scoped would mean 25 fixture executions, 25 fixture tear down, and 25 test executions but I am not using it).

The behaviour of pytest-sugar is a bit unexpected (see attached images), all the green bars progress simultaneously. In a way it makes sense logically, but could there be a better way to manage session-scoped fixtures? Having a visual that shows how the doing are doing per fixture would be awesome to be honest.

pytest session in progress:
Screenshot 2023-08-24 at 16 55 37

pytest session completed:
Screenshot 2023-08-24 at 16 58 09

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

1 participant