Skip to content

Commit 051620d

Browse files
committed
use regex instead of formatted strings
1 parent 68e1375 commit 051620d

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/test_ingestion.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
including filtering patterns and subpaths.
66
"""
77

8+
import re
89
from pathlib import Path
910
from typing import TypedDict
1011

@@ -214,7 +215,9 @@ def test_include_ignore_patterns(
214215
summary, structure, content = ingest_query(sample_query)
215216

216217
assert "Repository: test_user/test_repo" in summary
217-
assert f"Files analyzed: {pattern_scenario["expected_num_files"]}" in summary
218+
num_files_regex = re.compile(r"^Files analyzed: (\d+)$", re.MULTILINE)
219+
assert (num_files_match := num_files_regex.search(summary)) is not None
220+
assert int(num_files_match.group(1)) == pattern_scenario["expected_num_files"]
218221

219222
# Check presence of key files in the content
220223
for expected_content_item in pattern_scenario["expected_content"]:

0 commit comments

Comments
 (0)