Implement assertIsNone for Python < 2.7.
authorJelmer Vernooij <jelmer@samba.org>
Thu, 5 Feb 2015 09:25:53 +0000 (10:25 +0100)
committerAndrew Bartlett <abartlet@samba.org>
Fri, 6 Mar 2015 03:41:49 +0000 (04:41 +0100)
Change-Id: I3937acb16ca0c5430b70f0af305997878da53c37
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/__init__.py

index 9c82abd66813d40df7495f922ca646e533c4ec4a..413ac69833c556dae3675b7efbe1e33ebad26f69 100644 (file)
@@ -70,6 +70,9 @@ class TestCase(unittest.TestCase):
         def assertIsInstance(self, a, b):
             self.assertTrue(isinstance(a, b))
 
+        def assertIsNone(self, a, msg=None):
+            self.assertTrue(a is None, msg)
+
         def addCleanup(self, fn, *args, **kwargs):
             self._cleanups = getattr(self, "_cleanups", []) + [
                 (fn, args, kwargs)]