mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
remove test for should_dirty_commit
This commit is contained in:
parent
0a653d34d3
commit
6c2923ff70
1 changed files with 0 additions and 20 deletions
|
@ -94,26 +94,6 @@ class TestCoder(unittest.TestCase):
|
||||||
fname.unlink()
|
fname.unlink()
|
||||||
self.assertEqual(coder.get_last_modified(), 0)
|
self.assertEqual(coder.get_last_modified(), 0)
|
||||||
|
|
||||||
def test_should_dirty_commit(self):
|
|
||||||
# Mock the IO object
|
|
||||||
mock_io = MagicMock()
|
|
||||||
|
|
||||||
with GitTemporaryDirectory():
|
|
||||||
repo = git.Repo(Path.cwd())
|
|
||||||
fname = Path("new.txt")
|
|
||||||
fname.touch()
|
|
||||||
repo.git.add(str(fname))
|
|
||||||
repo.git.commit("-m", "new")
|
|
||||||
|
|
||||||
# Initialize the Coder object with the mocked IO and mocked repo
|
|
||||||
coder = Coder.create(models.GPT4, None, mock_io)
|
|
||||||
|
|
||||||
fname.write_text("hi")
|
|
||||||
self.assertTrue(coder.should_dirty_commit("hi"))
|
|
||||||
|
|
||||||
self.assertFalse(coder.should_dirty_commit("/exit"))
|
|
||||||
self.assertFalse(coder.should_dirty_commit("/help"))
|
|
||||||
|
|
||||||
def test_check_for_file_mentions(self):
|
def test_check_for_file_mentions(self):
|
||||||
# Mock the IO object
|
# Mock the IO object
|
||||||
mock_io = MagicMock()
|
mock_io = MagicMock()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue