[Python-checkins] cpython: Remove old Python 2 compatibility from ctypes test

martin.panter python-checkins at python.org
Sat May 14 02:28:01 EDT 2016


https://hg.python.org/cpython/rev/8d802f93a55a
changeset:   101333:8d802f93a55a
user:        Martin Panter <vadmium+py at gmail.com>
date:        Sat May 14 06:17:43 2016 +0000
summary:
  Remove old Python 2 compatibility from ctypes test

files:
  Lib/ctypes/test/test_structures.py |  7 ++-----
  1 files changed, 2 insertions(+), 5 deletions(-)


diff --git a/Lib/ctypes/test/test_structures.py b/Lib/ctypes/test/test_structures.py
--- a/Lib/ctypes/test/test_structures.py
+++ b/Lib/ctypes/test/test_structures.py
@@ -326,11 +326,8 @@
 
         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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list