App / tests /__init__.py
amadmateen's picture
Test: Implement complete unit test suites for frontend and backend, fix Windows encoding crash
6012c2e
Raw History Blame Contribute Delete
391 Bytes
import sys
# Ensure console output uses UTF-8 on Windows to prevent UnicodeEncodeErrors during piped test runs
if sys.platform.startswith('win'):
try:
if hasattr(sys.stdout, 'reconfigure'):
sys.stdout.reconfigure(encoding='utf-8')
if hasattr(sys.stderr, 'reconfigure'):
sys.stderr.reconfigure(encoding='utf-8')
except Exception:
pass