From a10efa951b37526764dada58c7306f6f98bffe5a Mon Sep 17 00:00:00 2001 From: dgtlmoon Date: Mon, 3 May 2021 11:20:11 +1000 Subject: [PATCH] Also detect pytest in the environ (for local debug) --- backend/store.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/backend/store.py b/backend/store.py index 3d9749db..d14d8086 100644 --- a/backend/store.py +++ b/backend/store.py @@ -113,7 +113,8 @@ class ChangeDetectionStore: if not 'app_guid' in self.__data: import sys - if "pytest" in sys.modules: + import os + if "pytest" in sys.modules or "PYTEST_CURRENT_TEST" in os.environ: self.__data['app_guid'] = "test-" + str(uuid_builder.uuid4()) else: self.__data['app_guid'] = str(uuid_builder.uuid4())