Skip to content

Commit

Permalink
different method to determine if in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jedwards4b committed Nov 16, 2023
1 parent 539952e commit 9c90434
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manic/repository_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 9c90434

Please sign in to comment.