From cb24f8c6d4a1b00134bc5e1ada0c17c9f4b7395a Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Mon, 12 Aug 2024 14:09:52 -0700 Subject: [PATCH] attempt to fix windows tests in CI --- aider/utils.py | 3 +-- tests/basic/test_commands.py | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/aider/utils.py b/aider/utils.py index b36ceee33..e2d48d3b1 100644 --- a/aider/utils.py +++ b/aider/utils.py @@ -16,7 +16,6 @@ IMAGE_EXTENSIONS = {".png", ".jpg", ".jpeg", ".gif", ".bmp", ".tiff", ".webp"} class IgnorantTemporaryDirectory: def __init__(self): self.temp_dir = tempfile.TemporaryDirectory() - self.temp_dir = str(Path(self.temp_dir).resolve()) def __enter__(self): return self.temp_dir.__enter__() @@ -45,7 +44,7 @@ class ChdirTemporaryDirectory(IgnorantTemporaryDirectory): def __enter__(self): res = super().__enter__() - os.chdir(self.temp_dir.name) + os.chdir(Path(self.temp_dir.name).resolve()) return res def __exit__(self, exc_type, exc_val, exc_tb): diff --git a/tests/basic/test_commands.py b/tests/basic/test_commands.py index 07ea47c00..ff00e38b8 100644 --- a/tests/basic/test_commands.py +++ b/tests/basic/test_commands.py @@ -575,7 +575,6 @@ class TestCommands(TestCase): ) ) - repo = git.Repo() repo.git.add(str(test_file)) repo.git.commit("-m", "initial")