Skip to content

Commit 5e419eb

Browse files
committed
fix ci discrepancy where the default branch is master
1 parent 195986a commit 5e419eb

4 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/tests/integration/conftest.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ def temp_dir():
5858

5959
@pytest.fixture
6060
def git_repo(temp_dir):
61-
subprocess.run(["git", "init"], cwd=temp_dir, check=True)
61+
subprocess.run(["git", "init", "-b", "main"], cwd=temp_dir, check=True)
6262
subprocess.run(
6363
["git", "config", "user.email", "test@example.com"], cwd=temp_dir, check=True
6464
)

src/tests/integration/repo_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def setup_repo(self):
3232
shutil.rmtree(self.path)
3333
self.path.mkdir(parents=True)
3434

35-
subprocess.run(["git", "init"], cwd=self.path, check=True)
35+
subprocess.run(["git", "init", "-b", "main"], cwd=self.path, check=True)
3636
subprocess.run(
3737
["git", "config", "user.email", "test@example.com"],
3838
cwd=self.path,

src/tests/unit/core/commands/test_git_parsing.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def git_repo(tmp_path: Path):
4444
repo_path.mkdir()
4545
os.chdir(repo_path)
4646

47-
subprocess.check_call(["git", "init"])
47+
subprocess.check_call(["git", "init", "-b", "main"])
4848
subprocess.check_call(["git", "config", "user.name", "Test User"])
4949
subprocess.check_call(["git", "config", "user.email", "test@example.com"])
5050

src/tests/unit/core/syntheizer/test_synthesizer_extended.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def multi_file_git_repo(tmp_path):
4040
repo_path.mkdir()
4141

4242
# Initialize Git repo
43-
subprocess.run(["git", "init"], cwd=repo_path, check=True)
43+
subprocess.run(["git", "init", "-b", "main"], cwd=repo_path, check=True)
4444
subprocess.run(
4545
["git", "config", "user.name", "Test User"], cwd=repo_path, check=True
4646
)

0 commit comments

Comments
 (0)