Skip to content

Commit f55f6b5

Browse files
committed
Fix remaining Windows Unicode issue in test output checker
- Added platform detection to check_outputs.py - Use ASCII characters ([OK], [FAIL]) on Windows - Keep Unicode characters (✓, ✗) on Unix-like systems - Fixes the last failing test on Windows CI
1 parent 2668a05 commit f55f6b5

File tree

1 file changed

+16
-3
lines changed

1 file changed

+16
-3
lines changed

tests/check_outputs.py

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
"""Check that expected output files were generated."""
33

44
import sys
5+
import platform
56
from pathlib import Path
67

78
output_dir = Path('tests/output_all')
@@ -14,11 +15,23 @@
1415
print(f' - {f.name}: {size_kb:.1f} KB')
1516

1617
if len(files) >= 5:
17-
print(f'\n✓ All expected files generated successfully!')
18+
# Use ASCII characters on Windows to avoid encoding issues
19+
if platform.system() == 'Windows':
20+
print(f'\n[OK] All expected files generated successfully!')
21+
else:
22+
print(f'\n✓ All expected files generated successfully!')
1823
sys.exit(0)
1924
else:
20-
print(f'\n✗ Expected at least 5 PDFs, found {len(files)}')
25+
# Use ASCII characters on Windows to avoid encoding issues
26+
if platform.system() == 'Windows':
27+
print(f'\n[FAIL] Expected at least 5 PDFs, found {len(files)}')
28+
else:
29+
print(f'\n✗ Expected at least 5 PDFs, found {len(files)}')
2130
sys.exit(1)
2231
else:
23-
print('✗ Output directory not found')
32+
# Use ASCII characters on Windows to avoid encoding issues
33+
if platform.system() == 'Windows':
34+
print('[FAIL] Output directory not found')
35+
else:
36+
print('✗ Output directory not found')
2437
sys.exit(1)

0 commit comments

Comments
 (0)