diff --git a/pytest_django/plugin.py b/pytest_django/plugin.py index 6b1aa137..8af5c1e0 100644 --- a/pytest_django/plugin.py +++ b/pytest_django/plugin.py @@ -476,6 +476,13 @@ def get_order_number(test: pytest.Item) -> int: items.sort(key=get_order_number) +def pytest_unconfigure(config: pytest.Config) -> None: + if blocking_manager_key not in config.stash: + return + blocking_manager = config.stash[blocking_manager_key] + blocking_manager.unblock() + + @pytest.fixture(autouse=True, scope="session") def django_test_environment(request: pytest.FixtureRequest) -> Generator[None, None, None]: """Setup Django's test environment for the testing session.