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\
_______________________________________________
pypy-commit mailing list
pypy-commit@python.org
https://mail.python.org/mailman/listinfo/pypy-commit

Reply via email to