(self)
| 102 | self.assertTrue(coder.need_commit_before_edits) |
| 103 | |
| 104 | def test_get_files_content(self): |
| 105 | tempdir = Path(tempfile.mkdtemp()) |
| 106 | |
| 107 | file1 = tempdir / "file1.txt" |
| 108 | file2 = tempdir / "file2.txt" |
| 109 | |
| 110 | file1.touch() |
| 111 | file2.touch() |
| 112 | |
| 113 | files = [file1, file2] |
| 114 | |
| 115 | # Initialize the Coder object with the mocked IO and mocked repo |
| 116 | coder = Coder.create(self.GPT35, None, io=InputOutput(), fnames=files) |
| 117 | |
| 118 | content = coder.get_files_content().splitlines() |
| 119 | self.assertIn("file1.txt", content) |
| 120 | self.assertIn("file2.txt", content) |
| 121 | |
| 122 | def test_check_for_filename_mentions(self): |
| 123 | with GitTemporaryDirectory(): |
nothing calls this directly
no test coverage detected