File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1010sys .modules ['tkinter.ttk' ] = MagicMock ()
1111sys .modules ['tkinter.messagebox' ] = MagicMock ()
1212sys .modules ['tkinter.filedialog' ] = MagicMock ()
13+
14+ # Matplotlib Mocks (Fixed the missing modules here)
1315sys .modules ['matplotlib' ] = MagicMock ()
1416sys .modules ['matplotlib.pyplot' ] = MagicMock ()
17+ sys .modules ['matplotlib.figure' ] = MagicMock () # <--- ADDED THIS
18+ sys .modules ['matplotlib.gridspec' ] = MagicMock () # <--- ADDED THIS (Just in case)
19+ sys .modules ['matplotlib.backends' ] = MagicMock ()
1520sys .modules ['matplotlib.backends.backend_tkagg' ] = MagicMock ()
21+
1622sys .modules ['pyvisa' ] = MagicMock ()
1723sys .modules ['pymeasure' ] = MagicMock ()
1824sys .modules ['PIL' ] = MagicMock ()
@@ -52,6 +58,9 @@ def test_launcher_buttons(self):
5258 app .launch_script (target_script )
5359
5460 # ASSERTION 1: Did we try to spawn a process?
61+ if not MockProcess .called :
62+ print (" [Error] Process not spawned. Script might have crashed during import." )
63+
5564 MockProcess .assert_called ()
5665
5766 # ASSERTION 2: Did we pass the correct script?
You can’t perform that action at this time.
0 commit comments