Skip to content

Commit 63a06a5

Browse files
Update test_auto_discovery.py
after failed test 1
1 parent 77c5cea commit 63a06a5

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

tests/test_auto_discovery.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,13 @@
1515
'pymeasure', 'pymeasure.instruments', 'pymeasure.instruments.keithley',
1616
'matplotlib', 'matplotlib.pyplot', 'matplotlib.backends',
1717
'matplotlib.backends.backend_tkagg', 'matplotlib.figure',
18+
'matplotlib.gridspec', # <--- ADDED THIS (Fixes your error)
19+
'matplotlib.ticker', # <--- ADDED THIS (Prevent future errors)
1820
'PIL', 'PIL.Image', 'PIL.ImageTk',
1921
'pandas', 'numpy', 'gpib_ctypes'
2022
]
2123

24+
# Apply the mocks to sys.modules
2225
for mod in MOCK_MODULES:
2326
sys.modules[mod] = MagicMock()
2427

@@ -77,10 +80,8 @@ def test_all_frontends_and_launchers(self):
7780
except Exception as e:
7881
print(f"FAIL\n Error: {e}")
7982
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
8283

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}.")
8485

8586
# Fail the test if anything broke
8687
self.assertEqual(failure_count, 0, f"{failure_count} modules failed to load.")

0 commit comments

Comments
 (0)