Author: Amaury Forgeot d'Arc <[email protected]>
Branch: py3k
Changeset: r58275:5ce4ecaaa057
Date: 2012-10-20 07:27 +0200
http://bitbucket.org/pypy/pypy/changeset/5ce4ecaaa057/

Log:    Skip an implementation detail about unitialized module.__dict__
        (same change as for 2.7)

diff --git a/lib-python/3.2/test/test_module.py 
b/lib-python/3.2/test/test_module.py
--- a/lib-python/3.2/test/test_module.py
+++ b/lib-python/3.2/test/test_module.py
@@ -1,6 +1,6 @@
 # Test the module type
 import unittest
-from test.support import run_unittest, gc_collect
+from test.support import run_unittest, gc_collect, check_impl_detail
 
 import sys
 ModuleType = type(sys)
@@ -10,8 +10,10 @@
         # An uninitialized module has no __dict__ or __name__,
         # and __doc__ is None
         foo = ModuleType.__new__(ModuleType)
-        self.assertTrue(foo.__dict__ is None)
-        self.assertRaises(SystemError, dir, foo)
+        self.assertFalse(foo.__dict__)
+        if check_impl_detail():
+            self.assertTrue(foo.__dict__ is None)
+            self.assertRaises(SystemError, dir, foo)
         try:
             s = foo.__name__
             self.fail("__name__ = %s" % repr(s))
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to