Add assertIs to cover py2.6

This commit is contained in:
Andrew Melton 2013-11-05 12:42:09 -05:00
parent fb47da1704
commit 8fa06a12a2

View File

@ -95,6 +95,9 @@ class StacktachBaseTestCase(unittest.TestCase):
def assertIsInstance(self, obj, cls, msg=None):
self.assertTrue(isinstance(obj, cls), msg)
def assertIs(self, expr1, expr2, msg=None):
self.assertTrue(expr1 is expr2, msg)
def assertRaises(self, excClass, callableObj=None, *args, **kwargs):
context = _AssertRaisesContext(excClass, self)
if callableObj is None: