[pypy-commit] pypy py3.5: mark some tests as impl details

arigo pypy.commits at gmail.com
Thu Dec 15 09:38:54 EST 2016


Author: Armin Rigo <arigo at tunes.org>
Branch: py3.5
Changeset: r89071:01d17dcb5fe6
Date: 2016-12-15 15:19 +0100
http://bitbucket.org/pypy/pypy/changeset/01d17dcb5fe6/

Log:	mark some tests as impl details

diff --git a/lib-python/3/test/test_builtin.py b/lib-python/3/test/test_builtin.py
--- a/lib-python/3/test/test_builtin.py
+++ b/lib-python/3/test/test_builtin.py
@@ -1775,8 +1775,9 @@
         for doc in 'x', '\xc4', '\U0001f40d', 'x\x00y', b'x', 42, None:
             A = type('A', (), {'__doc__': doc})
             self.assertEqual(A.__doc__, doc)
-        with self.assertRaises(UnicodeEncodeError):
-            type('A', (), {'__doc__': 'x\udcdcy'})
+        if check_impl_detail():     # CPython encodes __doc__ into tp_doc
+            with self.assertRaises(UnicodeEncodeError):
+                type('A', (), {'__doc__': 'x\udcdcy'})
 
         A = type('A', (), {})
         self.assertEqual(A.__doc__, None)
@@ -1807,8 +1808,9 @@
     def test_bad_slots(self):
         with self.assertRaises(TypeError):
             type('A', (), {'__slots__': b'x'})
-        with self.assertRaises(TypeError):
-            type('A', (int,), {'__slots__': 'x'})
+        if check_impl_detail():     # 'int' is variable-sized on CPython 3.x
+            with self.assertRaises(TypeError):
+                type('A', (int,), {'__slots__': 'x'})
         with self.assertRaises(TypeError):
             type('A', (), {'__slots__': ''})
         with self.assertRaises(TypeError):


More information about the pypy-commit mailing list