We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0a1396f commit 242866eCopy full SHA for 242866e
test/conftest.py
@@ -2,6 +2,7 @@
2
from pathlib import Path
3
import pytest
4
import subprocess
5
+from genericpath import exists
6
7
8
# Fixture to run test in current tmp_path
@@ -31,9 +32,11 @@ def xtl_clone(git2cpp_path):
31
32
33
@pytest.fixture
34
def git_config(git2cpp_path):
- with open("test/data/.gitconfig", "a") as f:
35
- f.write("[user]\n name = Jane Doe\n email = jane.doe@blabla.com")
+ gitconfig_path = "~/.gitconfig"
36
+ if not(os.path.isfile(gitconfig_path)):
37
+ with open("~/.gitconfig", "a") as f:
38
+ f.write("[user]\n name = Jane Doe\n email = jane.doe@blabla.com")
39
- yield
40
+ yield
41
- os.remove("test/data/.gitconfig")
42
+ os.remove("test/data/.gitconfig")
0 commit comments