mirror of
https://github.com/bec-project/ophyd_devices.git
synced 2026-09-05 04:10:56 +02:00
The positioner timeout tests passed for the wrong reasons: one hand-set _timeout directly instead of passing the constructor argument (so it only exercised stock ophyd PositionerBase.move), and the other asserted _timeout == 3, which cannot distinguish PositionerBase storing the raw int from the PSI path storing the normalized float - both tests stayed green with the entire timeout block deleted. They now construct the device with timeout=..., assert the normalized float, cover the non-positive-means-none normalization that only the PSI path performs, and run inside the mocked control layer instead of starting real channel-access searches for nonexistent PVs. The patched-status tests in test_utils created 14 live statuses carrying real 3-7 s timeouts and never finished them. Their timeout threads fired seconds after the tests returned, logging failures into whatever test was running and calling device.stop() on the test devices - for the test positioner that even raised a TypeError on a background thread, since its stop() takes no success argument. The statuses are now finished at the end of each test and the devices destroyed.