mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-24 14:25:00 +00:00
refactor: Update test_get_roots_to_watch to include .gitignore in watched roots
This commit is contained in:
parent
17f35cde19
commit
c37ddd7872
1 changed files with 4 additions and 2 deletions
|
@ -1,5 +1,6 @@
|
|||
from pathlib import Path
|
||||
|
||||
from aider.dump import dump # noqa
|
||||
from aider.io import InputOutput
|
||||
from aider.watch import FileWatcher
|
||||
|
||||
|
@ -90,8 +91,9 @@ def test_get_roots_to_watch(tmp_path):
|
|||
gitignore.write_text("excluded/")
|
||||
watcher = FileWatcher(coder, root=tmp_path, gitignores=[gitignore])
|
||||
roots = watcher.get_roots_to_watch()
|
||||
assert len(roots) == 1
|
||||
assert Path(roots[0]).name == "included"
|
||||
assert len(roots) == 2
|
||||
assert Path(sorted(roots)[0]).name == ".gitignore"
|
||||
assert Path(sorted(roots)[1]).name == "included"
|
||||
|
||||
|
||||
def test_handle_changes():
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue