Author: Philip Jenvey <[email protected]>
Branch: stdlib-2.7.4
Changeset: r64952:489d7cdfdf2f
Date: 2013-06-20 17:00 -0700
http://bitbucket.org/pypy/pypy/changeset/489d7cdfdf2f/
Log: support --withoutmod-cpyext
diff --git a/lib-python/2.7/test/test_support.py
b/lib-python/2.7/test/test_support.py
--- a/lib-python/2.7/test/test_support.py
+++ b/lib-python/2.7/test/test_support.py
@@ -19,9 +19,12 @@
import re
import time
import struct
-import _testcapi
import sysconfig
try:
+ import _testcapi
+except ImportError:
+ _testcapi = None
+try:
import thread
except ImportError:
thread = None
@@ -952,7 +955,7 @@
# add GC header size
if ((type(o) == type) and (o.__flags__ & _TPFLAGS_HEAPTYPE) or\
((type(o) != type) and (type(o).__flags__ & _TPFLAGS_HAVE_GC))):
- size += _testcapi.SIZEOF_PYGC_HEAD
+ size += 1 if _testcapi is None else _testcapi.SIZEOF_PYGC_HEAD
msg = 'wrong size for %s: got %d, expected %d' \
% (type(o), result, size)
test.assertEqual(result, size, msg)
_______________________________________________
pypy-commit mailing list
[email protected]
http://mail.python.org/mailman/listinfo/pypy-commit