You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Teardown ordering is incorrect sometimes (both different from vanilla pytest, and not following the "reverse ordering for teardown" rule) for a session where you have async tests and both explicitly depended session-scoped fixtures and autouse session-scoped fixtures.
Following the autouse ordering, we should also probably ensure not to run autouse fixtures concurrently with explicitly-selected fixtures.
Example code (with pytest-trio and trio mode enabled):
In the pytest documentation https://docs.pytest.org/en/6.2.x/fixture.html#fixture-instantiation-order, fixtures with the
autouse
flag are ordered specially vs non-autouse fixtures (and the ordering for instantiating fixtures should be reversed when tearing down fixtures https://docs.pytest.org/en/6.2.x/fixture.html#yield-fixtures-recommended).Teardown ordering is incorrect sometimes (both different from vanilla pytest, and not following the "reverse ordering for teardown" rule) for a session where you have async tests and both explicitly depended session-scoped fixtures and autouse session-scoped fixtures.
Following the autouse ordering, we should also probably ensure not to run autouse fixtures concurrently with explicitly-selected fixtures.
Example code (with pytest-trio and trio mode enabled):
Output:
The text was updated successfully, but these errors were encountered: