MCPcopy
hub / github.com/langroid/langroid / test_git_create_checkout_branch

Function test_git_create_checkout_branch

tests/main/test_git_utils.py:123–132  ·  view source on GitHub ↗
(temp_git_repo)

Source from the content-addressed store, hash-verified

121
122
123def test_git_create_checkout_branch(temp_git_repo):
124 # Make an initial commit to create the HEAD reference
125 test_file = os.path.join(temp_git_repo.working_dir, "initial.txt")
126 with open(test_file, "w") as f:
127 f.write("Initial content")
128 temp_git_repo.index.add([test_file])
129 temp_git_repo.index.commit("Initial commit")
130
131 git_create_checkout_branch(temp_git_repo, "new-branch")
132 assert temp_git_repo.active_branch.name == "new-branch"
133
134
135def test_git_diff_file(temp_git_repo):

Callers

nothing calls this directly

Calls 3

writeMethod · 0.80
addMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…