diff options
| author | Jelmer Vernooij <jelmer@samba.org> | 2015-02-05 10:25:53 +0100 |
|---|---|---|
| committer | Andrew Bartlett <abartlet@samba.org> | 2015-03-06 04:41:49 +0100 |
| commit | d459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f (patch) | |
| tree | ec0843b0cd886ca5d2b3465d062338130c2b00f9 /python | |
| parent | 1988e11585f8e928b2c52d2d97bf1269253b18d0 (diff) | |
| download | samba-d459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f.tar.gz samba-d459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f.tar.xz samba-d459096e7c35f7bc7a83fd69cf0f70fc5ae4e15f.zip | |
Implement assertIsNone for Python < 2.7.
Change-Id: I3937acb16ca0c5430b70f0af305997878da53c37
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'python')
| -rw-r--r-- | python/samba/tests/__init__.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py index 9c82abd668..413ac69833 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)] |
