mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-04-27 06:20:25 +00:00
test_web: improve shouldFail2() error reporting
This commit is contained in:
parent
a92385b54b
commit
81c30b1cd1
@ -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))
|
||||
|
Loading…
x
Reference in New Issue
Block a user