Remove old Python 2 compatibility from ctypes test

This commit is contained in:
Martin Panter 2016-05-14 06:17:43 +00:00
parent 0e40df6e54
commit 38e2f175ea
1 changed files with 2 additions and 5 deletions

View File

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