mirror of
https://github.com/Aider-AI/aider.git
synced 2025-05-29 16:54:59 +00:00
test: Add assertion for line count in test_ai_comment_pattern
This commit is contained in:
parent
e5b8899b4c
commit
b16ba547ab
1 changed files with 9 additions and 5 deletions
|
@ -45,10 +45,14 @@ def test_ai_comment_pattern():
|
||||||
|
|
||||||
# Test watch_question.js fixture
|
# Test watch_question.js fixture
|
||||||
question_js_path = fixtures_dir / "watch_question.js"
|
question_js_path = fixtures_dir / "watch_question.js"
|
||||||
question_js_lines, question_js_comments, question_js_has_bang = watcher.get_ai_comments(str(question_js_path))
|
question_js_lines, question_js_comments, question_js_has_bang = watcher.get_ai_comments(
|
||||||
|
str(question_js_path)
|
||||||
|
)
|
||||||
question_js_expected = 5
|
question_js_expected = 5
|
||||||
|
assert len(question_js_lines) == question_js_expected, (
|
||||||
|
f"Expected {question_js_expected} AI comments in watch_question.js fixture, found"
|
||||||
|
f" {len(question_js_lines)}"
|
||||||
|
)
|
||||||
assert (
|
assert (
|
||||||
len(question_js_lines) == question_js_expected
|
question_js_has_bang
|
||||||
), f"Expected {question_js_expected} AI comments in watch_question.js fixture, found {len(question_js_lines)}"
|
), "Expected at least one bang (!) comment in watch_question.js fixture"
|
||||||
assert question_js_has_bang, "Expected at least one bang (!) comment in watch_question.js fixture"
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue