Skip to content

Commit

Permalink
MNT #897
Browse files Browse the repository at this point in the history
  • Loading branch information
prjemian committed Jan 8, 2024
1 parent 33dc166 commit a2318f7
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
8 changes: 5 additions & 3 deletions apstools/devices/simulated_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,13 @@
~SimulatedTransformControllerPositioner
"""

from . import PVPositionerSoftDoneWithStop
import time

from ophyd import FormattedComponent as FC

from ..synApps import SwaitRecord
from ..synApps import TransformRecord
from ophyd import FormattedComponent as FC
import time
from . import PVPositionerSoftDoneWithStop


class SimulatedSwaitControllerPositioner(PVPositionerSoftDoneWithStop):
Expand Down
14 changes: 7 additions & 7 deletions apstools/devices/tests/test_simulated_controllers.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

from ...tests import IOC_GP
from ...tests import timed_pause
from .. import simulated_controllers as stc
from .. import simulated_controllers as sc

PV_SWAIT = f"{IOC_GP}userCalc7"
PV_TRANS = f"{IOC_GP}userTran7"
Expand All @@ -19,12 +19,12 @@
@pytest.mark.parametrize(
"pv, controller_class, context, exp_info",
[
[PV_SWAIT, stc.SimulatedSwaitControllerPositioner, does_not_raise(), "None"],
[PV_TRANS, stc.SimulatedTransformControllerPositioner, does_not_raise(), "None"],
["", stc.SimulatedSwaitControllerPositioner, pytest.raises(ValueError), "Must supply a value for"],
["", stc.SimulatedTransformControllerPositioner, pytest.raises(ValueError), "Must supply a value for"],
["wrong_pv", stc.SimulatedSwaitControllerPositioner, pytest.raises(TimeoutError), "Failed to connect"],
["wrong_pv", stc.SimulatedTransformControllerPositioner, pytest.raises(TimeoutError), "Failed to connect"],
[PV_SWAIT, sc.SimulatedSwaitControllerPositioner, does_not_raise(), "None"],
[PV_TRANS, sc.SimulatedTransformControllerPositioner, does_not_raise(), "None"],
["", sc.SimulatedSwaitControllerPositioner, pytest.raises(ValueError), "Must supply a value for"],
["", sc.SimulatedTransformControllerPositioner, pytest.raises(ValueError), "Must supply a value for"],
["wrong_pv", sc.SimulatedSwaitControllerPositioner, pytest.raises(TimeoutError), "Failed to connect"],
["wrong_pv", sc.SimulatedTransformControllerPositioner, pytest.raises(TimeoutError), "Failed to connect"],
],
)
@pytest.mark.parametrize("tol", [0.99, 2, 5])
Expand Down

0 comments on commit a2318f7

Please sign in to comment.