Skip to content

Commit 1e9c172

Browse files
committed
Add smoke test for size.py script output
1 parent 5edddd2 commit 1e9c172

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

tests/test_size.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
import subprocess, sys, os
2+
3+
4+
def test_runs_and_prints_header():
5+
"""Smoke test: script runs and prints the table header line."""
6+
result = subprocess.run([sys.executable, os.path.join(os.path.dirname(__file__), '..', 'size.py')], capture_output=True, text=True, check=True)
7+
stdout = result.stdout.splitlines()
8+
# Ensure at least 2 lines: header + separator
9+
assert any(line.startswith('Package') and 'Size (MB)' in line for line in stdout), 'Header line missing'
10+
assert any(set(line) == {'-'} and len(line) >= 10 for line in stdout), 'Separator line missing'

0 commit comments

Comments
 (0)