Multiple invocations of class-scoped fixture change called finalizer order #2495
Labels
topic: fixtures
anything involving fixtures directly or indirectly
type: bug
problem that needs to be addressed
I'm running into some undesired teardown ordering in pytest 3.1.2.
If I remove the
uses_request
parameter fromtest_two
then the tests pass, but this prevents me being able to runtest_two
on its own (mark.usefixtures('uses_request')
also triggers the unwanted behavior). Is my expectation that finalizer calls should always be lifo correct? I'd think that the presence of multipleuses_request
should behave no differently than it appearing once.By having the teardown functions not occur in the order of finalizer registration my tests error in product-specific ways I cannot account for without losing desired coverage.
The text was updated successfully, but these errors were encountered: