@@ -99,10 +99,10 @@ def test_01_k2400_iv_backend(self):
9999
100100 with patch ('pymeasure.instruments.keithley.Keithley2400' ) as MockInst :
101101 spy = MockInst .return_value
102- with patch ('builtins.input' , side_effect = ['100' , '10' , 'test_file' ]),
103- patch ('pandas.DataFrame.to_csv' ):
102+ with patch ('builtins.input' , side_effect = ['100' , '10' , 'test_file' ]), \
103+ patch ('pandas.DataFrame.to_csv' ):
104104 self .run_module_safely (
105- "Keithley_2400.Backends.IV_K2400_Loop_Backend_v10 " , {})
105+ "Keithley_2400.Instrument_Control.IV_K2400_Loop_Instrument_Control_v10 " , {})
106106 spy .enable_source .assert_called ()
107107
108108 @pytest .mark .usefixtures ("mock_tkinter" )
@@ -111,13 +111,13 @@ def test_02_lakeshore_backend(self):
111111 mock_sleep .start ()
112112 self .addCleanup (mock_sleep .stop )
113113 with patch ('pyvisa.ResourceManager' ) as MockRM :
114- spy = MockRM .return_value .open_resource .return_value # noqa
114+ spy = MockRM .return_value .open_resource .return_value
115115 spy .query .side_effect = [
116116 "LSCI,MODEL350,0,0" ] + ["10.0" , "300.0" ] * 20
117117
118- with patch ('builtins.input' , side_effect = ['10' , '300' , '10' , '350' ]),
119- patch ('builtins.open' , mock_open ()):
120- self .run_module_safely ("Lakeshore_350_340.Backends.T_Control_L350_Simple_Backend_v10 " , {})
118+ with patch ('builtins.input' , side_effect = ['10' , '300' , '10' , '350' ]), \
119+ patch ('builtins.open' , mock_open ()):
120+ self .run_module_safely ("Lakeshore_350_340.Instrument_Control.T_Control_L350_Simple_Instrument_Control_v10 " , {})
121121
122122 @pytest .mark .usefixtures ("mock_tkinter" )
123123 def test_03_k6517b_pyro_backend (self ):
@@ -129,13 +129,13 @@ def test_03_k6517b_pyro_backend(self):
129129 spy .current = 1.23e-9
130130 with patch ('pandas.DataFrame.to_csv' ):
131131 self .run_module_safely (
132- "Keithley_6517B.Pyroelectricity.Backends ."
133- "Current_K6517B_Simple_Backend_v10 " , {})
132+ "Keithley_6517B.Pyroelectricity.Instrument_Control ."
133+ "Current_K6517B_Simple_Instrument_Control_v10 " , {})
134134
135135 @pytest .mark .usefixtures ("mock_tkinter" )
136136 def test_04_lcr_keysight_backend (self ):
137137 with patch ('pymeasure.instruments.agilent.AgilentE4980' ), \
138- patch ('pyvisa.ResourceManager' ) as MockRM :
138+ patch ('pyvisa.ResourceManager' ) as MockRM :
139139 mock_sleep = patch ('time.sleep' , side_effect = self .get_circuit_breaker (5 ))
140140 mock_sleep .start ()
141141 self .addCleanup (mock_sleep .stop )
@@ -144,7 +144,7 @@ def test_04_lcr_keysight_backend(self):
144144 visa_spy .query .return_value = "0.5"
145145 with patch ('pandas.DataFrame.to_csv' ):
146146 self .run_module_safely (
147- "LCR_Keysight_E4980A.Backends.CV_KE4980A_Simple_Backend_v10 " , {})
147+ "LCR_Keysight_E4980A.Instrument_Control.CV_KE4980A_Simple_Instrument_Control_v10 " , {})
148148
149149 @pytest .mark .usefixtures ("mock_tkinter" )
150150 def test_05_delta_simple (self ):
@@ -154,9 +154,9 @@ def test_05_delta_simple(self):
154154 with patch ('pyvisa.ResourceManager' ) as MockRM :
155155 MockRM .return_value .open_resource .return_value
156156 inputs = ['0' , '1e-5' , '1e-6' , 'test_file' , 'y' , 'y' ]
157- with patch ('builtins.input' , side_effect = inputs ),
158- patch ('pandas.DataFrame.to_csv' ):
159- self .run_module_safely ("Delta_mode_Keithley_6221_2182.Backends .Delta_K6221_K2182_Simple_v7" , {})
157+ with patch ('builtins.input' , side_effect = inputs ), \
158+ patch ('pandas.DataFrame.to_csv' ):
159+ self .run_module_safely ("Delta_mode_Keithley_6221_2182.Instrument_Control .Delta_K6221_K2182_Simple_v7" , {})
160160
161161 @pytest .mark .usefixtures ("mock_tkinter" )
162162 def test_06_delta_sensing (self ):
@@ -168,11 +168,11 @@ def test_06_delta_sensing(self):
168168 inst = MockRM .return_value .open_resource .return_value
169169 inst .query .return_value = "+1.23E-5"
170170 inputs = ['10' , '300' , '10' , 'test_file' , 'y' ]
171- with patch ('builtins.input' , side_effect = inputs ),
172- patch ('pandas.DataFrame.to_csv' ):
171+ with patch ('builtins.input' , side_effect = inputs ), \
172+ patch ('pandas.DataFrame.to_csv' ):
173173 try :
174174 self .run_module_safely (
175- "Delta_mode_Keithley_6221_2182.Backends.Delta_K6221_K2182_L350_T_Sensing_Backend_v1 " , {})
175+ "Delta_mode_Keithley_6221_2182.Instrument_Control.Delta_K6221_K2182_L350_T_Sensing_Instrument_Control_v1 " , {})
176176 except ModuleNotFoundError :
177177 print (" [SKIP] Module not found, skipping." )
178178
@@ -190,7 +190,7 @@ def test_07_lockin_backend(self):
190190 "1.23,4.56" # SNAP? 3,4
191191 ]
192192 self .run_module_safely (
193- "Lock_in_amplifier.BasicTest_S830_Backend_v1 " , {})
193+ "Lock_in_amplifier.BasicTest_S830_Instrument_Control_v1 " , {})
194194
195195 @pytest .mark .usefixtures ("mock_tkinter" )
196196 def test_08_combined_2400_2182 (self ):
@@ -211,10 +211,10 @@ def test_08_combined_2400_2182(self):
211211 # Add extra inputs just in case the script asks for more than
212212 # expected
213213 inputs = ['10' , '1' , 'test_file' , 'y' , 'y' , 'y' , 'y' ]
214- with patch ('builtins.input' , side_effect = inputs ),
215- patch ('pandas.DataFrame.to_csv' ):
214+ with patch ('builtins.input' , side_effect = inputs ), \
215+ patch ('pandas.DataFrame.to_csv' ):
216216 self .run_module_safely (
217- "Keithley_2400_Keithley_2182.Backends.IV_K2400_K2182_Backend_v1 " , {})
217+ "Keithley_2400_Keithley_2182.Instrument_Control.IV_K2400_K2182_Instrument_Control_v1 " , {})
218218 mock_pymeasure .stop ()
219219
220220 @pytest .mark .usefixtures ("mock_tkinter" )
@@ -226,7 +226,7 @@ def test_09_poling(self):
226226 inputs = ['100' , '10' , 'y' ]
227227 with patch ('builtins.input' , side_effect = inputs ):
228228 self .run_module_safely (
229- "Keithley_6517B.Pyroelectricity.Backends.Poling_K6517B_Backend_v10 " , {})
229+ "Keithley_6517B.Pyroelectricity.Instrument_Control.Poling_K6517B_Instrument_Control_v10 " , {})
230230
231231 @pytest .mark .usefixtures ("mock_tkinter" )
232232 def test_10_high_resistance (self ):
@@ -242,9 +242,9 @@ def test_10_high_resistance(self):
242242 # Correct inputs for: start_v, stop_v, steps, delay, filename
243243 inputs = ['-10' , '10' , '5' , '0.1' , 'test_file' ]
244244
245- with patch ('builtins.input' , side_effect = inputs ),
246- patch ('builtins.open' , mock_open ()):
247- self .run_module_safely ("Keithley_6517B.High_Resistance.Backends.IV_K6517B_Simple_Backend_v10 " , {}) # noqa
245+ with patch ('builtins.input' , side_effect = inputs ), \
246+ patch ('builtins.open' , mock_open ()):
247+ self .run_module_safely ("Keithley_6517B.High_Resistance.Instrument_Control.IV_K6517B_Simple_Instrument_Control_v10 " , {})
248248
249249 @pytest .mark .usefixtures ("mock_tkinter" )
250250 def test_11_gpib_scanner (self ):
@@ -266,9 +266,9 @@ def test_12_gpib_rescue(self):
266266 self .addCleanup (mock_sleep .stop )
267267
268268 rm = MockRM .return_value
269- rm .list_ . resources .return_value = ('GPIB0::1::INSTR' ,)
269+ rm .list_resources .return_value = ('GPIB0::1::INSTR' ,)
270270 self .run_module_safely (
271- "Utilities.GPIB_Interface_Rescue_Simple_Backened_v2_ " , {})
271+ "Utilities.GPIB_Interface_Rescue_Simple_Instrument_Control_v2_ " , {})
272272
273273
274274if __name__ == '__main__' :
0 commit comments