diff --git a/.gitignore b/.gitignore index 4da140b..0cbacc1 100644 --- a/.gitignore +++ b/.gitignore @@ -18,4 +18,4 @@ relPaths.sh *_info_settings.req *.py[cod] __pycache__/ -/system_tests/test-reports \ No newline at end of file +test-reports \ No newline at end of file diff --git a/system_tests/lewis_emulators/Measm905/device.py b/system_tests/lewis_emulators/Measm905/device.py index 7cf7281..d76796a 100644 --- a/system_tests/lewis_emulators/Measm905/device.py +++ b/system_tests/lewis_emulators/Measm905/device.py @@ -1,7 +1,6 @@ from collections import OrderedDict from .states import DefaultState from lewis.devices import StateMachineDevice -import random @@ -12,7 +11,7 @@ def _initialize_data(self): """ Initialize all of the device's attributes. """ - self._pressure = 1 + self.pressure = 1 def _get_state_handlers(self): return { @@ -25,8 +24,4 @@ def _get_initial_state(self): def _get_transition_handlers(self): return OrderedDict([ ]) - - @property - def pressure(self): - return self._pressure - \ No newline at end of file + \ No newline at end of file diff --git a/system_tests/tests/measm905.py b/system_tests/tests/measm905.py index db1aa86..b6f7cde 100644 --- a/system_tests/tests/measm905.py +++ b/system_tests/tests/measm905.py @@ -19,7 +19,7 @@ ] -TEST_MODES = [TestModes.RECSIM, TestModes.DEVSIM] +TEST_MODES = [TestModes.DEVSIM] class Measm905Tests(unittest.TestCase): @@ -30,5 +30,7 @@ def setUp(self): self._lewis, self._ioc = get_running_lewis_and_ioc("Measm905", DEVICE_PREFIX) self.ca = ChannelAccess(device_prefix=DEVICE_PREFIX) - def test_that_fails(self): - self.fail("You haven't implemented any tests!") + @skip_if_recsim("In rec sim this test fails") + def test_WHEN_pressure_changes_THEN_pv_also_changes(self): + self._lewis.backdoor_set_on_device("pressure", 42) + self.ca.assert_that_pv_is("PRESSURE", 42) \ No newline at end of file