Assert that the file exists before iterating through commits.

This commit is contained in:
Paul Gauthier 2023-08-18 08:00:03 -07:00
parent d09e85adc2
commit f722394db6

View file

@ -380,6 +380,11 @@ class TestCoder(unittest.TestCase):
io = InputOutput(yes=True)
coder = Coder.create(models.GPT4, "diff", io=io, fnames=[str(fname)])
self.assertTrue(fname.exists())
### TODO: assert that the next line raises git.exc.GitCommandError
repo.iter_commits(repo.active_branch.name)
def mock_send(*args, **kwargs):
coder.partial_response_content = f"""
Do this: