Execute all tests.
()
| 454 | |
| 455 | |
| 456 | def run_tests(): |
| 457 | """Execute all tests.""" |
| 458 | print("=" * 60) |
| 459 | print("Pager Code Test - Using MockPager (no hardware required)") |
| 460 | print("=" * 60) |
| 461 | print() |
| 462 | |
| 463 | if VERBOSE: |
| 464 | print("[INFO] Verbose mode enabled - showing all mock draw calls") |
| 465 | print() |
| 466 | |
| 467 | errors = [] |
| 468 | warnings = [] |
| 469 | |
| 470 | # ========== TEST 1: pager_menu.py ========== |
| 471 | print("[TEST 1] Importing pager_menu.py...") |
| 472 | try: |
| 473 | import pager_menu |
| 474 | print("[OK] pager_menu.py imported successfully") |
| 475 | except Exception as e: |
| 476 | print(f"[FAIL] pager_menu.py: {e}") |
| 477 | import traceback |
| 478 | traceback.print_exc() |
| 479 | errors.append(('pager_menu.py', str(e))) |
| 480 | |
| 481 | print() |
| 482 | |
| 483 | # ========== TEST 2: pager_display.py ========== |
| 484 | print("[TEST 2] Importing pager_display.py...") |
| 485 | try: |
| 486 | import pager_display |
| 487 | print("[OK] pager_display.py imported successfully") |
| 488 | except Exception as e: |
| 489 | print(f"[FAIL] pager_display.py: {e}") |
| 490 | import traceback |
| 491 | traceback.print_exc() |
| 492 | errors.append(('pager_display.py', str(e))) |
| 493 | |
| 494 | print() |
| 495 | |
| 496 | # ========== TEST 3: PagerRagnar.py syntax ========== |
| 497 | print("[TEST 3] Checking PagerRagnar.py syntax...") |
| 498 | try: |
| 499 | import importlib.util |
| 500 | spec = importlib.util.spec_from_file_location("PagerRagnar", |
| 501 | os.path.join(os.path.dirname(__file__), "PagerRagnar.py")) |
| 502 | pager_ragnar = importlib.util.module_from_spec(spec) |
| 503 | print("[OK] PagerRagnar.py syntax OK") |
| 504 | except Exception as e: |
| 505 | print(f"[FAIL] PagerRagnar.py: {e}") |
| 506 | import traceback |
| 507 | traceback.print_exc() |
| 508 | errors.append(('PagerRagnar.py', str(e))) |
| 509 | |
| 510 | print() |
| 511 | |
| 512 | # ========== TEST 4: RagnarMenu instantiation ========== |
| 513 | print("[TEST 4] Testing pager_menu.RagnarMenu instantiation...") |
no test coverage detected