Skip to content

Commit

Permalink
Merge pull request slaclab#1046 from nstelter-slac/fix_test
Browse files Browse the repository at this point in the history
Fix issue where rules test fails if also running testing-ioc
  • Loading branch information
YektaY authored Oct 31, 2023
2 parents e39a66e + 04e32a9 commit ec627c2
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions pydm/tests/widgets/test_rules.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def test_unregister(qtbot):
"name": "Rule #1",
"property": "Visible",
"expression": "ch[0] < 1",
"channels": [{"channel": "ca://MTEST:Float", "trigger": True}],
"channels": [{"channel": "ca://TESTRULES:Float", "trigger": True}],
}
]

Expand Down Expand Up @@ -81,7 +81,7 @@ def test_rules_not_connected(qtbot, caplog):
"name": "Rule #1",
"property": "Visible",
"expression": "ch[0] < 1",
"channels": [{"channel": "ca://MTEST:Float", "trigger": True}],
"channels": [{"channel": "ca://TESTRULES:Float", "trigger": True}],
}
]

Expand Down Expand Up @@ -111,6 +111,7 @@ def test_rules_ok(qtbot, caplog):
caplog : fixture
To capture the log messages
"""

widget = PyDMLabel()
qtbot.addWidget(widget)
widget.show()
Expand All @@ -121,7 +122,7 @@ def test_rules_ok(qtbot, caplog):
"name": "Rule #1",
"property": "Visible",
"expression": "ch[0] < 1",
"channels": [{"channel": "ca://MTEST:Float", "trigger": True}],
"channels": [{"channel": "ca://TESTRULES:Float", "trigger": True}],
}
]

Expand Down Expand Up @@ -166,7 +167,7 @@ def test_rules_enums(use_enum, visible, qtbot, caplog):
"name": "Rule #1",
"property": "Visible",
"expression": 'ch[0] == "RUN"',
"channels": [{"channel": "ca://MTEST:Float", "trigger": True}],
"channels": [{"channel": "ca://TESTRULES:Float", "trigger": True}],
}
]
if use_enum is not None:
Expand Down Expand Up @@ -225,7 +226,7 @@ def test_rules_invalid_expr(qtbot, caplog):
"name": "Rule #1",
"property": "Visible",
"expression": "ch[0] < 1",
"channels": [{"channel": "ca://MTEST:Float", "trigger": True}],
"channels": [{"channel": "ca://TESTRULES:Float", "trigger": True}],
}
]

Expand Down Expand Up @@ -278,7 +279,7 @@ def test_rules_initial_value(qtbot, caplog):
"property": "Text",
"expression": "str(ch[0])",
"initial_value": "Initial Value Test",
"channels": [{"channel": "ca://MTEST:Float", "trigger": True}],
"channels": [{"channel": "ca://TESTRULES:Float", "trigger": True}],
}
]

Expand Down

0 comments on commit ec627c2

Please sign in to comment.