From eff9d2164cc7a3415f8c0473e0449339ac27beb8 Mon Sep 17 00:00:00 2001 From: Tomas Babej Date: Fri, 6 Jan 2017 12:09:30 +0100 Subject: [PATCH] tests: Provide more details when regex search fails --- tests/base.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/base.py b/tests/base.py index 9a62ac9..2013a47 100644 --- a/tests/base.py +++ b/tests/base.py @@ -117,7 +117,8 @@ class IntegrationTest(object): # Multiline-evaluate the 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: assert lines == len(result.splitlines())