Skip to content

Commit 137000c

Browse files
committed
feat: upgrade remote scanning and reporting (tests/test_scanner.py)
1 parent 1917579 commit 137000c

1 file changed

Lines changed: 15 additions & 0 deletions

File tree

tests/test_scanner.py

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
"""Tests for scanner behavior."""
2+
3+
from roast.scanner import scan_repo
4+
5+
6+
def test_scan_repo_includes_config_files_only_when_requested(tmp_path) -> None:
7+
(tmp_path / "app.py").write_text("print('hi')\n", encoding="utf-8")
8+
(tmp_path / "README.md").write_text("# project\n", encoding="utf-8")
9+
(tmp_path / "pyproject.toml").write_text("[project]\nname='demo'\n", encoding="utf-8")
10+
11+
code_only = scan_repo(tmp_path, ["py"], max_files=10)
12+
with_config = scan_repo(tmp_path, ["py"], max_files=10, include_config=True)
13+
14+
assert [file.path for file in code_only] == ["app.py"]
15+
assert {file.path for file in with_config} == {"app.py", "README.md", "pyproject.toml"}

0 commit comments

Comments
 (0)