diff --git a/tests/test_utils_hastyepics.py b/tests/test_utils_hastyepics.py index a4583bbd5..984bd4845 100644 --- a/tests/test_utils_hastyepics.py +++ b/tests/test_utils_hastyepics.py @@ -7,12 +7,16 @@ import sys import os sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), '..'))) from slic.utils.hastyepics import * -from unittest.mock import patch +from unittest.mock import patch, PropertyMock def test_motor_instantiation_fast_vs_epics(): fast_times = [] slow_times = [] + + # Mock to simulate a real EPICS moteur + with patch('epics.Motor.get') as mock_get, \ + patch('epics.Motor.RTYP', new_callable=PropertyMock) as mock_rtyp: # Mean of 10 runs for _ in range(10):