update emc start/shutdown, initial emc tests

This commit is contained in:
Timothy Pogue
2022-09-10 12:51:29 -06:00
parent d8cdd92140
commit 866a564958
3 changed files with 97 additions and 8 deletions

View File

@@ -58,6 +58,11 @@ def log_has(line, logs):
return any(line == message for message in logs.messages)
def log_has_when(line, logs, when):
"""Check if line is found in caplog's messages during a specified stage"""
return any(line == message.message for message in logs.get_records(when))
def log_has_re(line, logs):
"""Check if line matches some caplog's message."""
return any(re.match(line, message) for message in logs.messages)