tests: Provide more details when regex search fails

This commit is contained in:
Tomas Babej 2017-01-06 12:09:30 +01:00
parent 0c7b5a0494
commit eff9d2164c

View file

@ -117,7 +117,8 @@ class IntegrationTest(object):
# Multiline-evaluate the regex # Multiline-evaluate the regex
if regex: if regex:
assert re.search(regex, result, re.MULTILINE) details = u"Regex not found in: {0}".format(result)
assert re.search(regex, result, re.MULTILINE), details
if lines: if lines:
assert lines == len(result.splitlines()) assert lines == len(result.splitlines())