From 8fa06a12a22ca4317c1f1462425b45d0f99c887c Mon Sep 17 00:00:00 2001 From: Andrew Melton Date: Tue, 5 Nov 2013 12:42:09 -0500 Subject: [PATCH] Add assertIs to cover py2.6 --- tests/unit/__init__.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/unit/__init__.py b/tests/unit/__init__.py index 9d9bbf0..a3dbb9b 100644 --- a/tests/unit/__init__.py +++ b/tests/unit/__init__.py @@ -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: