From d80e32bcbb91163d5e00a51366a3d43b14728dbc Mon Sep 17 00:00:00 2001 From: Daira Hopwood Date: Thu, 5 Sep 2013 17:55:54 +0100 Subject: [PATCH] Wed May 9 22:18:37 BST 2012 Brian Warner * test_web: improve shouldFail2() error reporting --- src/allmydata/test/test_web.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index 70014bfb..ae2808ba 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -473,9 +473,14 @@ class WebMixin(object): if isinstance(res, failure.Failure): res.trap(expected_failure) if substring: - self.failUnlessIn(substring, str(res), which) + self.failUnlessIn(substring, str(res), + "'%s' not in '%s' for test '%s'" % \ + (substring, str(res), which)) if response_substring: - self.failUnlessIn(response_substring, res.value.response, which) + self.failUnlessIn(response_substring, res.value.response, + "'%s' not in '%s' for test '%s'" % \ + (response_substring, res.value.response, + which)) else: self.fail("%s was supposed to raise %s, not get '%s'" % (which, expected_failure, res)) -- 2.45.2