]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Remove old Python 2 compatibility from ctypes test
authorMartin Panter <vadmium+py@gmail.com>
Sat, 14 May 2016 06:17:43 +0000 (06:17 +0000)
committerMartin Panter <vadmium+py@gmail.com>
Sat, 14 May 2016 06:17:43 +0000 (06:17 +0000)
Lib/ctypes/test/test_structures.py

index 84d456c3cc383536d55c1c87102f959767f030f1..e00bb046b444137695970b194bccc76496e107c1 100644 (file)
@@ -326,11 +326,8 @@ class StructureTestCase(unittest.TestCase):
 
         cls, msg = self.get_except(Person, b"Someone", (b"a", b"b", b"c"))
         self.assertEqual(cls, RuntimeError)
-        if issubclass(Exception, object):
-            self.assertEqual(msg,
-                                 "(Phone) <class 'TypeError'>: too many initializers")
-        else:
-            self.assertEqual(msg, "(Phone) TypeError: too many initializers")
+        self.assertEqual(msg,
+                             "(Phone) <class 'TypeError'>: too many initializers")
 
     def test_huge_field_name(self):
         # issue12881: segfault with large structure field names