Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ticket6041 add ioc measm905 #3

Merged
merged 3 commits into from
Jul 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,4 @@ relPaths.sh
*_info_settings.req
*.py[cod]
__pycache__/
/system_tests/test-reports
test-reports
9 changes: 2 additions & 7 deletions system_tests/lewis_emulators/Measm905/device.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
from collections import OrderedDict
from .states import DefaultState
from lewis.devices import StateMachineDevice
import random



Expand All @@ -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 {
Expand All @@ -25,8 +24,4 @@ def _get_initial_state(self):
def _get_transition_handlers(self):
return OrderedDict([
])

@property
def pressure(self):
return self._pressure


8 changes: 5 additions & 3 deletions system_tests/tests/measm905.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
]


TEST_MODES = [TestModes.RECSIM, TestModes.DEVSIM]
TEST_MODES = [TestModes.DEVSIM]


class Measm905Tests(unittest.TestCase):
Expand All @@ -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)