MCPcopy Create free account
hub / github.com/agentforce314/clawcodex / test_git_repo

Method test_git_repo

tests/test_git_context.py:84–96  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

82
83class TestCollectGitContext(unittest.TestCase):
84 def test_git_repo(self):
85 clear_git_caches()
86 with tempfile.TemporaryDirectory() as tmp:
87 _init_git_repo(tmp)
88 ctx = _run(collect_git_context(tmp))
89 self.assertTrue(ctx.available)
90 self.assertIsNotNone(ctx.branch)
91 self.assertIsNotNone(ctx.default_branch)
92 self.assertIsNotNone(ctx.user_name)
93 self.assertEqual(ctx.user_name, "Test User")
94 self.assertIsNotNone(ctx.recent_commits)
95 self.assertIn("Initial commit", ctx.recent_commits)
96 clear_git_caches()
97
98 def test_non_git_dir(self):
99 clear_git_caches()

Callers

nothing calls this directly

Calls 4

clear_git_cachesFunction · 0.90
collect_git_contextFunction · 0.90
_init_git_repoFunction · 0.70
_runFunction · 0.70

Tested by

no test coverage detected