From 1121df666441f5108bb6b751681616c8fe460e2b Mon Sep 17 00:00:00 2001 From: Brian Warner Date: Fri, 16 May 2008 16:08:38 -0700 Subject: [PATCH] testutil.shouldFail: mention the 'which' string in substring failures too --- src/allmydata/util/testutil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/allmydata/util/testutil.py b/src/allmydata/util/testutil.py index d62d905b..046d98e9 100644 --- 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)) -- 2.45.2