tests: fix 1 more, issue with git directories config
This commit is contained in:
parent
22e865578e
commit
fd016987a3
1 changed files with 10 additions and 0 deletions
10
rhodecode/tests/fixtures/fixture_utils.py
vendored
10
rhodecode/tests/fixtures/fixture_utils.py
vendored
|
|
@ -289,6 +289,16 @@ def tests_tmp_path(request):
|
|||
if not os.path.exists(TESTS_TMP_PATH):
|
||||
os.makedirs(TESTS_TMP_PATH)
|
||||
|
||||
# Sometimes git is upset about "suspicious directory" which interferes with tests
|
||||
import subprocess
|
||||
|
||||
try:
|
||||
subprocess.run(
|
||||
["git", "config", "--global", "--add", "safe.directory", TESTS_TMP_PATH], check=False, capture_output=True
|
||||
)
|
||||
except Exception:
|
||||
pass
|
||||
|
||||
if not request.config.getoption("--keep-tmp-path"):
|
||||
|
||||
@request.addfinalizer
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue