mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-27 15:55:00 +00:00
fix: Test check_gitignore with and without .env file
This commit is contained in:
parent
8768a8aca6
commit
350df7ca55
1 changed files with 7 additions and 0 deletions
|
@ -140,8 +140,15 @@ class TestMain(TestCase):
|
|||
|
||||
self.assertEqual(".aider*", gitignore.read_text().splitlines()[0])
|
||||
|
||||
# Test without .env file present
|
||||
gitignore.write_text("one\ntwo\n")
|
||||
check_gitignore(cwd, io)
|
||||
self.assertEqual("one\ntwo\n.aider*\n", gitignore.read_text())
|
||||
|
||||
# Test with .env file present
|
||||
env_file = cwd / ".env"
|
||||
env_file.touch()
|
||||
check_gitignore(cwd, io)
|
||||
self.assertEqual("one\ntwo\n.aider*\n.env\n", gitignore.read_text())
|
||||
del os.environ["GIT_CONFIG_GLOBAL"]
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue