[pypy-commit] pypy py3k-memoryview: Make lib-python tests work when pypy is translated without cpyext.

Manuel Jacob noreply at buildbot.pypy.org
Tue May 20 03:30:03 CEST 2014


Author: Manuel Jacob
Branch: py3k-memoryview
Changeset: r71597:627832fff626
Date: 2014-05-20 03:29 +0200
http://bitbucket.org/pypy/pypy/changeset/627832fff626/

Log:	Make lib-python tests work when pypy is translated without cpyext.

diff --git a/lib-python/3/test/support.py b/lib-python/3/test/support.py
--- a/lib-python/3/test/support.py
+++ b/lib-python/3/test/support.py
@@ -25,7 +25,6 @@
 import logging.handlers
 import struct
 import tempfile
-import _testcapi
 
 try:
     import _thread, threading
@@ -1145,6 +1144,7 @@
 _TPFLAGS_HEAPTYPE = 1<<9
 
 def check_sizeof(test, o, size):
+    import _testcapi
     result = sys.getsizeof(o)
     # add GC header size
     if ((type(o) == type) and (o.__flags__ & _TPFLAGS_HEAPTYPE) or\


More information about the pypy-commit mailing list