From 0fe3f89ecfcd5c70d723874dc817f17e184f52a9 Mon Sep 17 00:00:00 2001 From: Juliya Smith Date: Mon, 30 Sep 2024 09:55:52 -0500 Subject: [PATCH] perf: cond --- src/ape/pytest/runners.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/ape/pytest/runners.py b/src/ape/pytest/runners.py index 319c99771f..520e8c7fe9 100644 --- a/src/ape/pytest/runners.py +++ b/src/ape/pytest/runners.py @@ -160,6 +160,10 @@ def pytest_runtest_setup(self, item): # isolation is disabled via cmdline option or running doc-tests. return + if self.config_wrapper.isolation: + self._setup_isolation(item) + + def _setup_isolation(self, item): fixtures = self.fixture_manager.get_fixtures(item) builtins = self.fixture_manager.get_builtin_fixtures(item) for scope in (Scope.SESSION, Scope.PACKAGE, Scope.MODULE, Scope.CLASS):