projects
/
tahoe-lafs
/
tahoe-lafs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
304abfe
)
testutil.shouldFail: mention the 'which' string in substring failures too
author
Brian Warner
<warner@allmydata.com>
Fri, 16 May 2008 23:08:38 +0000
(16:08 -0700)
committer
Brian Warner
<warner@allmydata.com>
Fri, 16 May 2008 23:08:38 +0000
(16:08 -0700)
src/allmydata/util/testutil.py
patch
|
blob
|
history
diff --git
a/src/allmydata/util/testutil.py
b/src/allmydata/util/testutil.py
index d62d905b57155abea6dc6727fc2bfa035ef2f360..046d98e912a7f26224a93146f0ce74901feb519e 100644
(file)
--- a/
src/allmydata/util/testutil.py
+++ b/
src/allmydata/util/testutil.py
@@
-74,8
+74,8
@@
class ShouldFailMixin:
res.trap(expected_failure)
if substring:
self.failUnless(substring in str(res),
- "substring '%s' not in '%s'"
- % (substring, str(res)))
+ "
%s:
substring '%s' not in '%s'"
+ % (
which,
substring, str(res)))
else:
self.fail("%s was supposed to raise %s, not get '%s'" %
(which, expected_failure, res))