summaryrefslogtreecommitdiff
path: root/test/backunittest.py
diff options
context:
space:
mode:
Diffstat (limited to 'test/backunittest.py')
-rw-r--r--test/backunittest.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/backunittest.py b/test/backunittest.py
index 84a7f36e..3723dea4 100644
--- a/test/backunittest.py
+++ b/test/backunittest.py
@@ -36,6 +36,13 @@ class TestCase(unittest.TestCase):
msg = msg or ('%r not found in %r' % (member, container))
self.fail(msg)
+ if _need('assertNotIn'):
+ def assertNotIn(self, member, container, msg=None):
+ """Assert that `member` is not in `container`."""
+ if member in container:
+ msg = msg or ('%r found in %r' % (member, container))
+ self.fail(msg)
+
if _need('assertRaisesRegexp'):
def assertRaisesRegexp(self, excClass, regexp, callobj, *args, **kw):
""" Just like unittest.TestCase.assertRaises,