[PATCH 53/55] Implement assertIsNone for Python < 2.7.

Jelmer Vernooij jelmer at samba.org
Fri Feb 6 12:04:25 MST 2015


Change-Id: I3937acb16ca0c5430b70f0af305997878da53c37
Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
---
 python/samba/tests/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index 9c82abd..413ac69 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -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)]
-- 
2.1.4



More information about the samba-technical mailing list