MCPcopy
hub / github.com/Aider-AI/aider / test_noop_commit

Method test_noop_commit

tests/basic/test_repo.py:624–640  ·  view source on GitHub ↗
(self, mock_send)

Source from the content-addressed store, hash-verified

622
623 @patch("aider.models.Model.simple_send_with_retries")
624 def test_noop_commit(self, mock_send):
625 mock_send.return_value = '"a good commit message"'
626
627 with GitTemporaryDirectory():
628 # new repo
629 raw_repo = git.Repo()
630
631 # add it, but no commits at all in the raw_repo yet
632 fname = Path("file.txt")
633 fname.touch()
634 raw_repo.git.add(str(fname))
635 raw_repo.git.commit("-m", "new")
636
637 git_repo = GitRepo(InputOutput(), None, None)
638
639 commit_result = git_repo.commit(fnames=[str(fname)])
640 self.assertIsNone(commit_result)
641
642 @unittest.skipIf(platform.system() == "Windows", "Git hook execution differs on Windows")
643 def test_git_commit_verify(self):

Callers

nothing calls this directly

Calls 4

commitMethod · 0.95
GitRepoClass · 0.90
InputOutputClass · 0.90

Tested by

no test coverage detected