mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-28 08:14:59 +00:00
test: add minimal coder instance for FileWatcher test
This commit is contained in:
parent
6796d8f124
commit
fb3e5c9aab
1 changed files with 14 additions and 2 deletions
|
@ -1,11 +1,23 @@
|
|||
from pathlib import Path
|
||||
|
||||
from aider.io import InputOutput
|
||||
from aider.watch import FileWatcher
|
||||
|
||||
|
||||
def test_ai_comment_pattern():
|
||||
# Create a FileWatcher instance for testing
|
||||
watcher = FileWatcher(None)
|
||||
# Create minimal IO and Coder instances for testing
|
||||
class MinimalCoder:
|
||||
def __init__(self, io):
|
||||
self.io = io
|
||||
self.root = "."
|
||||
self.abs_fnames = set()
|
||||
|
||||
def get_rel_fname(self, fname):
|
||||
return fname
|
||||
|
||||
io = InputOutput(pretty=False, fancy_input=False, yes=False)
|
||||
coder = MinimalCoder(io)
|
||||
watcher = FileWatcher(coder)
|
||||
fixtures_dir = Path(__file__).parent.parent / "fixtures"
|
||||
|
||||
# Test Python fixture
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue