TST: More verbose when multiple regexs matched in sample test case

pull/300/head
Steven Hiscocks 12 years ago
parent 05fac65a50
commit 2b6ecfe56a

@ -118,7 +118,10 @@ def testSampleRegexsFactory(name):
self.assertTrue(faildata.get('match', False),
"Line matched when shouldn't have: %s:%i %r" %
(logFile.filename(), logFile.filelineno(), line))
self.assertEqual(len(ret), 1, "Multiple regexs matched")
self.assertEqual(len(ret), 1,
"Multiple regexs matched: regexs %s for %s:%i" % (
",".join(["%i" % a[0] for a in ret]),
logFile.filename(), logFile.filelineno()))
# Verify timestamp and host as expected
failregex, host, time = ret[0]
self.assertEqual(host, faildata.get("host", None))

Loading…
Cancel
Save