disable test on windows

This commit is contained in:
Paul Gauthier 2024-06-18 17:39:55 -07:00
parent eaaac4d65d
commit 4e6a546efd

View file

@ -1,4 +1,5 @@
import os
import platform
import tempfile
import unittest
from pathlib import Path
@ -138,9 +139,13 @@ class TestRepo(unittest.TestCase):
self.assertEqual(result, 'a good "commit message"')
@patch("aider.repo.GitRepo.get_commit_message")
def notest_commit_with_custom_committer_name(self, mock_send):
def test_commit_with_custom_committer_name(self, mock_send):
mock_send.return_value = '"a good commit message"'
# Cleanup of the git temp dir explodes on windows
if platform.system() == "Windows":
return
with GitTemporaryDirectory():
# new repo
raw_repo = git.Repo()
@ -179,11 +184,6 @@ class TestRepo(unittest.TestCase):
original_author_name = os.environ.get("GIT_AUTHOR_NAME")
self.assertIsNone(original_author_name)
del fname
del git_repo
del raw_repo
del io
def test_get_tracked_files(self):
# Create a temporary directory
tempdir = Path(tempfile.mkdtemp())