Commit 051e6577 authored by David Meredith's avatar David Meredith

BugFix: Don't test for error code number

In '[Errno N]' where N is a code, the code number varies across
different devices so can't rely on testing for that.
parent 7d896d59
Pipeline #1283 failed with stages
......@@ -26,7 +26,7 @@ def test_hev_client_state(caplog):
HEVClient(True)
time.sleep(1) # give enough time for het to log
# confirm message 'is the microcontroller running?' is NOT logged using err code
assert "[Errno 61]" not in caplog.text
assert "[Errno" not in caplog.text
# TODO assert hevclient.method tests
# myhevclient.send_cmd("CMD", "blah")
......
......@@ -43,8 +43,9 @@ def _hev_client_expected_state(myhevclient: HEVClient, caplog):
for record in caplog.records:
assert record.levelname != "CRITICAL"
assert (
"[Errno 61]" in caplog.text
) # confirm message 'is the microcontroller running?' is logged using err code
"[Errno" in caplog.text
) # confirm message 'is the microcontroller running?' is logged
# Can't specify an err code as these are different across devices
def _assert_posix():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment