From f722394db620489d85fc942a4147ebd466e6488a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Fri, 18 Aug 2023 08:00:03 -0700 Subject: [PATCH] Assert that the file exists before iterating through commits. --- tests/test_coder.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_coder.py b/tests/test_coder.py index f489b74ae..1fec956d4 100644 --- a/tests/test_coder.py +++ b/tests/test_coder.py @@ -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: