55# Import the GUI class we want to test
66from Keithley_2400 .IV_K2400_GUI_v5 import MeasurementAppGUI
77
8+
89class TestIVK2400GUI (unittest .TestCase ):
910
1011 def setUp (self ):
@@ -14,7 +15,7 @@ def setUp(self):
1415 """
1516 # We need a root window for the GUI to be instantiated, but we don't need to see it.
1617 self .root = tk .Tk ()
17- self .root .withdraw () # Hide the window
18+ self .root .withdraw () # Hide the window
1819
1920 def tearDown (self ):
2021 """
@@ -40,12 +41,12 @@ def test_start_measurement_logic(self, mock_subplots, MockBackend):
4041 # --- Simulate User Input ---
4142 # We directly set the values that would be entered into the GUI's Entry widgets.
4243 app .entries ["Sample Name" ].insert (0 , "TestSample" )
43- app .entries ["Max Current" ].insert (0 , "100" ) # 100 µA
44- app .entries ["Step Current" ].insert (0 , "10" ) # 10 µA
45- app .entries ["Compliance" ].insert (0 , "20" ) # 20 V
46- app .entries ["Delay" ].insert (0 , "0.5" ) # 0.5 s
44+ app .entries ["Max Current" ].insert (0 , "100" ) # 100 µA
45+ app .entries ["Step Current" ].insert (0 , "10" ) # 10 µA
46+ app .entries ["Compliance" ].insert (0 , "20" ) # 20 V
47+ app .entries ["Delay" ].insert (0 , "0.5" ) # 0.5 s
4748 app .keithley_combobox .set ("GPIB0::24::INSTR" )
48- app .file_location_path = "/fake/path" # Simulate browsing for a file
49+ app .file_location_path = "/fake/path" # Simulate browsing for a file
4950
5051 # --- Trigger the Action ---
5152 # Call the method that the "Start" button is connected to.
0 commit comments