Skip to content

Extra Documentation For Importing Session Scoped Fixtures From A File #13326

Open
@AyhamSaffar

Description

@AyhamSaffar

What's the problem this feature will solve?

@RonnyPfannschmidt confirmed that issue #3217 is a feature, not a bug. This however created hours of confusion for me as it led to test-breaking exceptions that could not be explained by the relevant pytest docs.

Describe the solution you'd like

A Python warning explaining this behaviour when manually importing session-scoped fixtures would have allowed this problem to be instantly debugged.

Alternative Solutions

Adding a warning to the aforementioned docs / the docstring of the pytest fixture scope attribute.

Additional context

Love the library. Just looking out for the next person.

Metadata

Metadata

Assignees

No one assigned

    Labels

    topic: fixturesanything involving fixtures directly or indirectly

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions