MCPcopy Index your code
hub / github.com/Codeplain-ai/codeplain / temp_repo

Function temp_repo

tests/test_git_utils.py:24–37  ·  view source on GitHub ↗

Create a temporary git repository for testing.

()

Source from the content-addressed store, hash-verified

22
23@pytest.fixture
24def temp_repo():
25 """Create a temporary git repository for testing."""
26 with tempfile.TemporaryDirectory() as temp_dir:
27 init_git_repo(temp_dir)
28
29 # Create and commit initial file
30 file_path = Path(temp_dir) / "test.txt"
31 file_path.write_text("initial content\nline2\nline3\n")
32
33 repo = Repo(temp_dir)
34 repo.index.add(["test.txt"])
35 add_all_files_and_commit(temp_dir, FUNCTIONAL_REQUIREMENT_FINISHED_COMMIT_MESSAGE.format("1.1"))
36
37 yield temp_dir
38
39
40@pytest.fixture

Callers

nothing calls this directly

Calls 3

init_git_repoFunction · 0.90
add_all_files_and_commitFunction · 0.90
formatMethod · 0.45

Tested by

no test coverage detected