]> git.rkrishnan.org Git - tahoe-lafs/tahoe-lafs.git/commitdiff
Wed May 9 22:18:37 BST 2012 Brian Warner <warner@lothar.com>
authorDaira Hopwood <daira@jacaranda.org>
Thu, 5 Sep 2013 16:55:54 +0000 (17:55 +0100)
committerDaira Hopwood <daira@jacaranda.org>
Thu, 5 Sep 2013 16:55:54 +0000 (17:55 +0100)
  * test_web: improve shouldFail2() error reporting

src/allmydata/test/test_web.py

index 70014bfbfc732100df433ae487784430e39db89c..ae2808baab7784e9bf3b4276f356af410e76a3b8 100644 (file)
@@ -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))