187 | @@ -188,8 +188,10 @@ def assert_start_raises_init_error(self, extra_args=None, expected_msg=None, *ar
188 | if expected_msg is not None:
189 | log_stderr.seek(0)
190 | stderr = log_stderr.read().decode('utf-8')
191 | - if re.fullmatch(expected_msg + '\n', stderr) is None:
192 | - raise AssertionError('Expected message "{}" does not match stderr:\n"{}"'.format(expected_msg, stderr))
193 | + if partial_match and re.search(expected_msg, stderr) is None:
194 | + raise AssertionError('Expected message "{}" does not parially match stderr:\n"{}"'.format(expected_msg, stderr))
195 | + elif re.fullmatch(expected_msg + '\n', stderr) is None:
This is wrong. Should be elif not partial_match and re.fullmatch(...)
or nest the whole thing one level deeper:
if partial match:
if re.search(...) is None:
#assert
else:
if re.fullmatch(...) is None:
#assert