mirror of
https://github.com/samba-team/samba.git
synced 2024-12-22 13:34:15 +03:00
Implement TestCase.assertIsNotNone for python < 2.7.
Change-Id: Ieaefdc77495e27bad791075d985a70908e9be1ad Signed-off-by: Jelmer Vernooij <jelmer@samba.org> Reviewed-by: Andrew Bartlett <abartlet@samba.org> Autobuild-User(master): Andrew Bartlett <abartlet@samba.org> Autobuild-Date(master): Fri Mar 6 07:11:43 CET 2015 on sn-devel-104
This commit is contained in:
parent
a6b2110abd
commit
7004ccc441
@ -64,14 +64,17 @@ class TestCase(unittest.TestCase):
|
||||
def assertIn(self, member, container, msg=None):
|
||||
self.assertTrue(member in container, msg)
|
||||
|
||||
def assertIs(self, a, b):
|
||||
self.assertTrue(a is b)
|
||||
def assertIs(self, a, b, msg=None):
|
||||
self.assertTrue(a is b, msg)
|
||||
|
||||
def assertIsNot(self, a, b):
|
||||
self.assertTrue(a is not b)
|
||||
def assertIsNot(self, a, b, msg=None):
|
||||
self.assertTrue(a is not b, msg)
|
||||
|
||||
def assertIsInstance(self, a, b):
|
||||
self.assertTrue(isinstance(a, b))
|
||||
def assertIsNotNone(self, a, msg=None):
|
||||
self.assertTrue(a is not None)
|
||||
|
||||
def assertIsInstance(self, a, b, msg=None):
|
||||
self.assertTrue(isinstance(a, b), msg)
|
||||
|
||||
def assertIsNone(self, a, msg=None):
|
||||
self.assertTrue(a is None, msg)
|
||||
|
Loading…
Reference in New Issue
Block a user