Skip to content

Commit 4d6fd5f

Browse files
authored
Fix failing workflow (#81)
* fix: failing workflow * Fix tests.yml
1 parent 76e760f commit 4d6fd5f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

tests/test_util_git_manager.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ class DummyException(Exception):
2525
def git_repo():
2626
with tempfile.TemporaryDirectory() as tmp_dir:
2727
repo = Repo.init(tmp_dir, initial_branch="main")
28+
repo.git.config("user.email", "test@example.com")
29+
repo.git.config("user.name", "Test User")
2830

2931
assert repo.active_branch.name == "main"
3032

@@ -42,6 +44,8 @@ def git_repo():
4244
def git_repo_with_config():
4345
with tempfile.TemporaryDirectory() as tmp_dir:
4446
repo = Repo.init(tmp_dir, initial_branch="main")
47+
repo.git.config("user.email", "test@example.com")
48+
repo.git.config("user.name", "Test User")
4549
assert repo.active_branch.name == "main"
4650

4751
# create an empty README file and commit it
@@ -85,6 +89,8 @@ def git_repo_with_submodule():
8589
main_repo = Repo.init(main_dir, initial_branch="main")
8690
assert main_repo.active_branch.name == "main"
8791
open(os.path.join(main_dir, "README.md"), "w").close()
92+
main_repo.git.config("user.email", "test@example.com")
93+
main_repo.git.config("user.name", "Test User")
8894
main_repo.index.add(["README.md"])
8995
main_repo.index.commit("Initial commit")
9096

0 commit comments

Comments
 (0)