File tree Expand file tree Collapse file tree 1 file changed +2
-12
lines changed
Expand file tree Collapse file tree 1 file changed +2
-12
lines changed Original file line number Diff line number Diff line change 44
55import bluesky .plan_stubs as bps
66import bluesky .plans as bp
7- import ophyd_async
87import pytest
8+ from ophyd_async .epics .motor import MotorLimitsError
99from ophyd_async .testing import get_mock_put , set_mock_value
1010
1111from ibex_bluesky_core .devices .block import (
@@ -353,21 +353,11 @@ async def test_block_mot_set_within_limits(mot_block):
353353
354354
355355async def test_block_mot_set_outside_limits (mot_block ):
356- # Local import as API not available in older ophyd_async versions
357- if ophyd_async ._version .version_tuple >= (0 , 13 , 5 ):
358- from ophyd_async .epics .motor import MotorLimitsError # pyright: ignore # noqa PLC0415
359-
360- err = MotorLimitsError
361- else :
362- from ophyd_async .epics .motor import MotorLimitsException # pyright: ignore # noqa PLC0415
363-
364- err = MotorLimitsException
365-
366356 set_mock_value (mot_block .user_setpoint , 10 )
367357 set_mock_value (mot_block .velocity , 10 )
368358 set_mock_value (mot_block .dial_high_limit_travel , 15 )
369359 set_mock_value (mot_block .dial_low_limit_travel , 5 )
370- with pytest .raises (err ):
360+ with pytest .raises (MotorLimitsError ):
371361 await mot_block .set (20 )
372362
373363
You can’t perform that action at this time.
0 commit comments