Author: Manuel Jacob <m...@manueljacob.de>
Branch: py3.5
Changeset: r90409:3371879bfdd7
Date: 2017-02-27 17:51 +0100
http://bitbucket.org/pypy/pypy/changeset/3371879bfdd7/

Log:    (plan_rich, mjacob) Mark this as an implementation detail
        (documented in b0cf041ff37c315390a54bf119dae8cc0b270a44).

diff --git a/lib-python/3/test/test_descr.py b/lib-python/3/test/test_descr.py
--- a/lib-python/3/test/test_descr.py
+++ b/lib-python/3/test/test_descr.py
@@ -1022,20 +1022,21 @@
         self.assertEqual(x.__dict__, {'foo': 1})
 
     def test_object_class_assignment_between_heaptypes_and_nonheaptypes(self):
-        class SubType(types.ModuleType):
-            a = 1
-
-        m = types.ModuleType("m")
-        self.assertTrue(m.__class__ is types.ModuleType)
-        self.assertFalse(hasattr(m, "a"))
-
-        m.__class__ = SubType
-        self.assertTrue(m.__class__ is SubType)
-        self.assertTrue(hasattr(m, "a"))
-
-        m.__class__ = types.ModuleType
-        self.assertTrue(m.__class__ is types.ModuleType)
-        self.assertFalse(hasattr(m, "a"))
+        if support.check_impl_detail(pypy=False):
+            class SubType(types.ModuleType):
+                a = 1
+
+            m = types.ModuleType("m")
+            self.assertTrue(m.__class__ is types.ModuleType)
+            self.assertFalse(hasattr(m, "a"))
+
+            m.__class__ = SubType
+            self.assertTrue(m.__class__ is SubType)
+            self.assertTrue(hasattr(m, "a"))
+
+            m.__class__ = types.ModuleType
+            self.assertTrue(m.__class__ is types.ModuleType)
+            self.assertFalse(hasattr(m, "a"))
 
         # Make sure that builtin immutable objects don't support __class__
         # assignment, because the object instances may be interned.
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to