mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 06:15:00 +00:00
fixed test for windows
This commit is contained in:
parent
0f9053008a
commit
5dd7287ee3
1 changed files with 4 additions and 4 deletions
|
@ -113,9 +113,9 @@ class TestMain(TestCase):
|
||||||
self.assertEqual(".aider*", gitignore.read_text().splitlines()[0])
|
self.assertEqual(".aider*", gitignore.read_text().splitlines()[0])
|
||||||
|
|
||||||
def test_check_gitignore(self):
|
def test_check_gitignore(self):
|
||||||
with tempfile.NamedTemporaryFile() as temp_gitconfig:
|
with GitTemporaryDirectory():
|
||||||
os.environ['GIT_CONFIG_GLOBAL'] = temp_gitconfig.name
|
os.environ["GIT_CONFIG_GLOBAL"] = "globalgitconfig"
|
||||||
make_repo()
|
|
||||||
io = InputOutput(pretty=False, yes=True)
|
io = InputOutput(pretty=False, yes=True)
|
||||||
cwd = Path.cwd()
|
cwd = Path.cwd()
|
||||||
gitignore = cwd / ".gitignore"
|
gitignore = cwd / ".gitignore"
|
||||||
|
@ -129,7 +129,7 @@ class TestMain(TestCase):
|
||||||
gitignore.write_text("one\ntwo\n")
|
gitignore.write_text("one\ntwo\n")
|
||||||
check_gitignore(cwd, io)
|
check_gitignore(cwd, io)
|
||||||
self.assertEqual("one\ntwo\n.aider*\n", gitignore.read_text())
|
self.assertEqual("one\ntwo\n.aider*\n", gitignore.read_text())
|
||||||
del os.environ['GIT_CONFIG_GLOBAL']
|
del os.environ["GIT_CONFIG_GLOBAL"]
|
||||||
|
|
||||||
def test_main_git_ignore(self):
|
def test_main_git_ignore(self):
|
||||||
cwd = Path().cwd()
|
cwd = Path().cwd()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue