Skip to content

Commit ef73084

Browse files
trying fix before sleep
1 parent 93f7097 commit ef73084

5 files changed

Lines changed: 1066 additions & 1062 deletions

File tree

Keithley_6517B/High_Resistance/Backends/IV_K6517B_Simple_Backend_v10.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def get_sweep_parameters():
4949
delay = float(input("Enter Settling Delay between points (s): "))
5050
filename = input(
5151
"Enter the filename to save data (e.g., SampleA_IV.csv): ")
52-
52+
5353
if not filename.lower().endswith('.csv'):
5454
filename += '.csv'
5555
return start_v, stop_v, steps, delay, filename

tests/test_fixes.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33

44
class TestFixes(unittest.TestCase):
55

6-
@patch('builtins.input', side_effect=['10', '2', 'test_output'])
6+
@patch('time.sleep', MagicMock()) # Add mock for time.sleep to isolate the test
7+
@patch('builtins.input', side_effect=['10', '2', 'test_output'])
78
@patch('pymeasure.instruments.keithley.Keithley2400')
89
@patch('matplotlib.pyplot.show')
910
@patch('pandas.DataFrame.to_csv')

tests/test_gui_iv_k2400.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,7 @@ def test_start_measurement_logic(self, MockFigure, MockBackend):
3535
mock_figure_instance = MockFigure.return_value
3636
mock_ax_vi = MagicMock()
3737
mock_ax_ri = MagicMock()
38-
# The GUI script calls subplots(), which needs to return our two mock axes
39-
mock_figure_instance.subplots.return_value = mock_ax_vi, mock_ax_ri
38+
mock_figure_instance.subplots.return_value = (mock_ax_vi, mock_ax_ri)
4039
app = MeasurementAppGUI(self.root)
4140

4241
# Mock the backend instance that the GUI will create

tests/test_t_control_l350_backend.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ def test_get_user_parameters(self, mock_input):
9292

9393
@patch('tkinter.Tk')
9494
@patch('tkinter.filedialog.asksaveasfilename', return_value='test.csv')
95-
@patch('builtins.input', side_effect=['10', '20', '5', '30'])
95+
@patch('builtins.input', side_effect=['10', '20', '5', '300'])
9696
@patch('Lakeshore_350_340.Backends.T_Control_L350_Simple_Backend_v10.Lakeshore350')
9797
@patch('matplotlib.pyplot.show')
9898
@patch('builtins.open', new_callable=mock_open)

0 commit comments

Comments
 (0)