|
15 | 15 | 'pymeasure', 'pymeasure.instruments', 'pymeasure.instruments.keithley', |
16 | 16 | 'matplotlib', 'matplotlib.pyplot', 'matplotlib.backends', |
17 | 17 | 'matplotlib.backends.backend_tkagg', 'matplotlib.figure', |
| 18 | + 'matplotlib.gridspec', # <--- ADDED THIS (Fixes your error) |
| 19 | + 'matplotlib.ticker', # <--- ADDED THIS (Prevent future errors) |
18 | 20 | 'PIL', 'PIL.Image', 'PIL.ImageTk', |
19 | 21 | 'pandas', 'numpy', 'gpib_ctypes' |
20 | 22 | ] |
21 | 23 |
|
| 24 | +# Apply the mocks to sys.modules |
22 | 25 | for mod in MOCK_MODULES: |
23 | 26 | sys.modules[mod] = MagicMock() |
24 | 27 |
|
@@ -77,10 +80,8 @@ def test_all_frontends_and_launchers(self): |
77 | 80 | except Exception as e: |
78 | 81 | print(f"FAIL\n Error: {e}") |
79 | 82 | failure_count += 1 |
80 | | - # We don't fail immediately so we can see all errors |
81 | | - # But we record it to fail the test at the end |
82 | 83 |
|
83 | | - print(f"\n[SUMMARY] Tested {found_count} modules. Failed {failure_count}.") |
| 84 | + print(f"\n[SUMMARY] Tested {found_count + failure_count} modules. Passed {found_count}. Failed {failure_count}.") |
84 | 85 |
|
85 | 86 | # Fail the test if anything broke |
86 | 87 | self.assertEqual(failure_count, 0, f"{failure_count} modules failed to load.") |
|
0 commit comments