From c37ddd7872c17a901ae5e22b57b9a7d7539fa311 Mon Sep 17 00:00:00 2001 From: Paul Gauthier Date: Thu, 6 Feb 2025 08:50:49 -0800 Subject: [PATCH] refactor: Update test_get_roots_to_watch to include .gitignore in watched roots --- tests/basic/test_watch.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/basic/test_watch.py b/tests/basic/test_watch.py index 17a2f3414..706fd1ade 100644 --- a/tests/basic/test_watch.py +++ b/tests/basic/test_watch.py @@ -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():