diff options
author | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2008-09-10 15:56:42 +0200 |
---|---|---|
committer | Pierre-Yves David <pierre-yves.david@logilab.fr> | 2008-09-10 15:56:42 +0200 |
commit | 85a794a2f97befe8929d40c84cc9ecc3bc8b2de5 (patch) | |
tree | 4d42970e31750ee2b687edc6677e2e68a5945980 /test | |
parent | 4d272ff5d7768873a0d46bb2f4d053a62abb4c69 (diff) | |
download | logilab-common-85a794a2f97befe8929d40c84cc9ecc3bc8b2de5.tar.gz |
Add and test an assertNotIn function for TestCase
Diffstat (limited to 'test')
-rw-r--r-- | test/unittest_testlib.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/test/unittest_testlib.py b/test/unittest_testlib.py index 2221e62..f7324a1 100644 --- a/test/unittest_testlib.py +++ b/test/unittest_testlib.py @@ -275,6 +275,10 @@ class TestlibTC(TestCase): obj, seq = 'a', ('toto', "azf", "coin") self.assertRaises(AssertionError, self.assertIn, obj, seq) + def test_not_in(self): + self.assertNotIn('a', ('toto', "azf", "coin")) + self.assertRaises(AssertionError, self.assertNotIn, 'a', "dsqgaqg") + class GenerativeTestsTC(TestCase): |