Skip to content

Commit cc960b4

Browse files
committed
test(integration): Check exit code of subprocess in integration test
1 parent 68f61ee commit cc960b4

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

scripts/version_scanner/tests/integration/test_scanner_integration.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ def test_integration_scan(tmp_path):
88
scanner_path = os.path.abspath("version_scanner.py")
99
config_path = os.path.abspath("regex_config.yaml")
1010

11-
# Static data directory (which we haven't created yet!)
11+
# Static data directory
1212
data_dir = os.path.abspath("tests/data")
1313

1414
# Run the scanner in the tmp_path so the output file is created there
@@ -21,8 +21,7 @@ def test_integration_scan(tmp_path):
2121
"-o", "scanner_report.csv"
2222
]
2323

24-
# This will fail because tests/data doesn't exist or is empty!
25-
result = subprocess.run(cmd, cwd=tmp_path, capture_output=True, text=True)
24+
result = subprocess.run(cmd, cwd=tmp_path, capture_output=True, text=True, check=True)
2625

2726
report_file = tmp_path / "scanner_report.csv"
2827
assert report_file.exists(), f"Report file not found. Stderr: {result.stderr}"

0 commit comments

Comments
 (0)