Skip to content

Commit aba6619

Browse files
updated test to deal with time sleep
1 parent 3a51fbc commit aba6619

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

tests/test_deep_simulation.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,11 @@ def test_01_k2400_iv_backend(self):
6262
print("\n[SIMULATION] 1. Keithley 2400 I-V Sweep...")
6363
with patch('pymeasure.instruments.keithley.Keithley2400') as MockInst:
6464
spy = MockInst.return_value
65-
target_sleep = 'Keithley_2400.Backends.IV_K2400_Loop_Backend_v10.sleep'
65+
# FIXED: Patch time.sleep globally instead of specific path to ensure capture
6666
breaker = self.get_circuit_breaker(5)
6767
with patch('builtins.input', side_effect=['100', '10', 'test']), \
6868
patch('pandas.DataFrame.to_csv'), \
69-
patch(target_sleep, side_effect=breaker):
69+
patch('time.sleep', side_effect=breaker):
7070
self.run_module_safely("Keithley_2400.Backends.IV_K2400_Loop_Backend_v10")
7171
spy.enable_source.assert_called()
7272

0 commit comments

Comments
 (0)