Skip to content

Unexpected display when running tests with sessions scoped fixtures #277

@kaki4am

Description

@kaki4am

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions