diff --git a/tools/azure-sdk-tools/devtools_testutils/proxy_fixtures.py b/tools/azure-sdk-tools/devtools_testutils/proxy_fixtures.py index c6733be223f8..2d553c646544 100644 --- a/tools/azure-sdk-tools/devtools_testutils/proxy_fixtures.py +++ b/tools/azure-sdk-tools/devtools_testutils/proxy_fixtures.py @@ -94,10 +94,13 @@ def get_or_record(self, variable: str, default: str) -> str: return self.variables.setdefault(variable, default) -@pytest.fixture +@pytest.fixture(scope="session") def environment_variables(test_proxy: None) -> EnvironmentVariableSanitizer: """Fixture that returns an EnvironmentVariableSanitizer for convenient environment variable fetching and sanitizing. + This fixture is session-scoped, so a single instance of EnvironmentVariableSanitizer is shared across all + tests using this fixture in the test session. + :param test_proxy: The fixture responsible for starting up the test proxy server. :type test_proxy: None