From: Daira Hopwood Date: Thu, 5 Sep 2013 16:55:54 +0000 (+0100) Subject: Wed May 9 22:18:37 BST 2012 Brian Warner X-Git-Url: https://git.rkrishnan.org/pf/content/en.html?a=commitdiff_plain;h=d80e32bcbb91163d5e00a51366a3d43b14728dbc;p=tahoe-lafs%2Ftahoe-lafs.git Wed May 9 22:18:37 BST 2012 Brian Warner * test_web: improve shouldFail2() error reporting --- 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))