From d459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Thu, 5 Feb 2015 10:25:53 +0100 Subject: [PATCH] Implement assertIsNone for Python < 2.7. Change-Id: I3937acb16ca0c5430b70f0af305997878da53c37 Signed-off-by: Jelmer Vernooij Reviewed-by: Andrew Bartlett --- 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 9c82abd6681..413ac69833c 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.11.4.GIT