Skip to content

Commit 9132749

Browse files
fsilvaortizclaude
andcommitted
refactor: address Copilot review suggestions in tests
- Fix misleading docstring on git_repo fixture - Remove manual shutil.rmtree(tmp_path); pytest owns tmp_path lifecycle - Disable GPG signing in test git repo for hermetic execution Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a45e9f0 commit 9132749

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

tests/test_create_new_feature.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323

2424
@pytest.fixture
2525
def git_repo(tmp_path):
26-
"""Create a temporary git repo with a fake remote that produces stdout on fetch."""
26+
"""Create a temporary git repo for testing create-new-feature.sh."""
2727
repo = tmp_path / "repo"
2828
repo.mkdir()
2929

@@ -35,14 +35,14 @@ def git_repo(tmp_path):
3535
# Create an initial commit so HEAD exists
3636
(repo / "README.md").write_text("# Test")
3737
subprocess.run(["git", "-C", str(repo), "add", "."], capture_output=True, check=True)
38+
subprocess.run(["git", "-C", str(repo), "config", "commit.gpgsign", "false"], capture_output=True, check=True)
3839
subprocess.run(["git", "-C", str(repo), "commit", "-m", "init"], capture_output=True, check=True)
3940

4041
# Create .specify dir to simulate an initialized project
4142
(repo / ".specify").mkdir()
4243
(repo / ".specify" / "templates").mkdir()
4344

4445
yield repo
45-
shutil.rmtree(tmp_path)
4646

4747

4848
@requires_git

0 commit comments

Comments
 (0)