git.samba.org
/
obnox
/
samba
/
samba-obnox.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cef4861
)
Provide TestCase.assertIsInstance for python < 2.7.
author
Jelmer Vernooij
<jelmer@samba.org>
Wed, 28 Jan 2015 22:17:13 +0000
(23:17 +0100)
committer
Andrew Bartlett
<abartlet@samba.org>
Fri, 6 Mar 2015 03:41:48 +0000
(
04:41
+0100)
Change-Id: Id6d3c8a7dc56cb560eccc3db897a83c638dec7a6
Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
python/samba/tests/__init__.py
patch
|
blob
|
history
diff --git
a/python/samba/tests/__init__.py
b/python/samba/tests/__init__.py
index 65a727aaf6c606e69ad9b475070b8efb08aeb009..480b2c813524b96e257d113185c54fdc687693e4 100644
(file)
--- a/
python/samba/tests/__init__.py
+++ b/
python/samba/tests/__init__.py
@@
-66,6
+66,10
@@
class TestCase(unittest.TestCase):
def assertIsNot(self, a, b):
self.assertTrue(a is not b)
+ if not getattr(unittest.TestCase, "assertIsInstance", None):
+ def assertIsInstance(self, a, b):
+ self.assertTrue(isinstance(a, b))
+
if not getattr(unittest.TestCase, "addCleanup", None):
def addCleanup(self, fn, *args, **kwargs):
self._cleanups = getattr(self, "_cleanups", []) + [