From 3b4f184298ee5af42a2e4afbee9b380e6938d7ee Mon Sep 17 00:00:00 2001 From: David Wilson Date: Wed, 23 Jan 2019 12:44:08 +0000 Subject: [PATCH] issue #477: replace type(e) -> __class__ for an exception Due to old style exception classes. --- tests/call_error_test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/call_error_test.py b/tests/call_error_test.py index 72df95b7..00ff0ed9 100644 --- a/tests/call_error_test.py +++ b/tests/call_error_test.py @@ -73,7 +73,7 @@ class UnpickleCallErrorTest(testlib.TestCase): def test_reify(self): e = self.func(u'some error') - self.assertEquals(mitogen.core.CallError, type(e)) + self.assertEquals(mitogen.core.CallError, e.__class__) self.assertEquals(1, len(e.args)) self.assertEquals(mitogen.core.UnicodeType, type(e.args[0])) self.assertEquals(u'some error', e.args[0])