Refactored creating a Coder object and getting tracked files in test_repo.py.

This commit is contained in:
Paul Gauthier 2023-07-21 14:32:20 -03:00
parent b9dc419f19
commit e9090f8d61

View file

@ -79,15 +79,8 @@ class TestRepo(unittest.TestCase):
repo.git.commit("-m", "added") repo.git.commit("-m", "added")
# Create a Coder object on the temporary directory
coder = Coder.create(
models.GPT4,
None,
io=InputOutput(),
fnames=[str(tempdir / filenames[0])],
)
tracked_files = coder.get_tracked_files() tracked_files = AiderRepo(InputOutput(), [tempdir]).get_tracked_files()
# On windows, paths will come back \like\this, so normalize them back to Paths # On windows, paths will come back \like\this, so normalize them back to Paths
tracked_files = [Path(fn) for fn in tracked_files] tracked_files = [Path(fn) for fn in tracked_files]