From: Brian Warner Date: Wed, 9 May 2012 21:18:37 +0000 (-0700) Subject: test_web: improve shouldFail2() error reporting X-Git-Url: https://git.rkrishnan.org/%5B/frontends/%22file:/somewhere?a=commitdiff_plain;h=81c30b1cd139b9cbe775320158c91acfc2245687;p=tahoe-lafs%2Ftahoe-lafs.git test_web: improve shouldFail2() error reporting --- diff --git a/src/allmydata/test/test_web.py b/src/allmydata/test/test_web.py index 54a30bee..7c7b0cae 100644 --- a/src/allmydata/test/test_web.py +++ b/src/allmydata/test/test_web.py @@ -479,9 +479,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))