Skip to content

Fixture tear-down order broken in 5.3.3 #6512

Open
@mschmitzer

Description

@mschmitzer

A change in pytest 5.3.3 (9918093, to be precise) broke fixture teardown for us. What happens is that fixture A depends on fixture B, but B gets torn down before A. This means that B is already torn down when A's tear-down code executes. Both fixtures have the same scope.
Reverting 9918093 on top of 5.3.3 restores the old behavior.

The test suite in question is quite involved. Sadly I haven't been able to create a minimal reproducer so far.

The contents of the virtualenv are here: pip-list.txt.

Pytest Version is 5.3.3, on Ubuntu 18.04.3, Python 3.6.8

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