Skip to content
Prev Previous commit
Next Next commit
try with os
  • Loading branch information
SandrineP committed Aug 4, 2025
commit 89162b528a324cf55277c5ca556ffe47362160b6
9 changes: 7 additions & 2 deletions test/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,5 +32,10 @@ def xtl_clone(git2cpp_path):

@pytest.fixture
def git_config(git2cpp_path, monkeypatch):
Comment thread
ianthomas23 marked this conversation as resolved.
Outdated
monkeypatch.setenv("GIT_AUTHOR_NAME", "Jane Doe")
monkeypatch.setenv("GIT_AUTHOR_EMAIL", "jane.doe@blabla.com")
os.environ["GIT_AUTHOR_NAME"] = "Jane Doe"
os.environ["GIT_AUTHOR_EMAIL"] = "jane.doe@blabla.com"

yield

del(os.environ["GIT_AUTHOR_NAME"])
del(os.environ["GIT_AUTHOR_EMAIL"])
2 changes: 1 addition & 1 deletion test/test_commit.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
working_dir = 'test/data/xtl'

@pytest.mark.parametrize("all_flag", ["", "-A", "--all", "--no-ignore-removal"])
def test_commit(xtl_clone, git_config, git2cpp_path, monkeypatch, all_flag):
def test_commit(xtl_clone, git_config, git2cpp_path, all_flag):
with open("./test/data/xtl/mook_file.txt", "x"):
pass

Expand Down
Loading