Also detect pytest in the environ (for local debug)

pull/43/head
dgtlmoon 2021-05-03 11:20:11 +10:00
rodzic 24a38f26f8
commit a10efa951b
1 zmienionych plików z 2 dodań i 1 usunięć

Wyświetl plik

@ -113,7 +113,8 @@ class ChangeDetectionStore:
if not 'app_guid' in self.__data: if not 'app_guid' in self.__data:
import sys 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()) self.__data['app_guid'] = "test-" + str(uuid_builder.uuid4())
else: else:
self.__data['app_guid'] = str(uuid_builder.uuid4()) self.__data['app_guid'] = str(uuid_builder.uuid4())