From 9c904341a721cb0d42a6c6a27a318f6fba5202d7 Mon Sep 17 00:00:00 2001 From: James Edwards Date: Thu, 16 Nov 2023 14:29:21 -0700 Subject: [PATCH] different method to determine if in tests --- manic/repository_git.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manic/repository_git.py b/manic/repository_git.py index a476954..aab1a46 100644 --- a/manic/repository_git.py +++ b/manic/repository_git.py @@ -7,6 +7,7 @@ import copy import os +import sys from .global_constants import EMPTY_STR, LOCAL_PATH_INDICATOR from .global_constants import VERBOSITY_VERBOSE @@ -843,7 +844,7 @@ def _git_update_submodules(verbosity, dirname): # submodules from file doesn't work without overriding the protocol, this is done # for testing submodule support but should not be done in practice file_protocol = "" - if "test/tmp/test_submodule" in dirname: + if 'unittest' in sys.modules.keys(): file_protocol = "-c protocol.file.allow=always" # First, verify that we have a .gitmodules file