From 4405fbdcc6d3899201e7dbb94e0218652ceed242 Mon Sep 17 00:00:00 2001 From: tligui_y Date: Sun, 3 Aug 2025 19:56:09 +0200 Subject: [PATCH] Update tests/test_utils_hastyepics.py --- tests/test_utils_hastyepics.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) 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):