summaryrefslogtreecommitdiffstats
path: root/Lib/test/support
diff options
context:
space:
mode:
authorSerhiy Storchaka <storchaka@gmail.com>2014-02-07 08:10:55 (GMT)
committerSerhiy Storchaka <storchaka@gmail.com>2014-02-07 08:10:55 (GMT)
commitf28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd (patch)
tree541cb209a2be79d6022ce5d47216755e9e9310a4 /Lib/test/support
parent622be340fdf4110c77e1f86bd13a01fc30c2bb65 (diff)
parent5cfc79deaeabf4af3c767665098a37da9f375eda (diff)
downloadcpython-f28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd.zip
cpython-f28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd.tar.gz
cpython-f28ba369dd068a76ff5b7efac58fdcb5c3eaf4dd.tar.bz2
Issue #20532: Tests which use _testcapi now are marked as CPython only.
Diffstat (limited to 'Lib/test/support')
-rw-r--r--Lib/test/support/__init__.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index a242a47..9857f9d 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -25,7 +25,6 @@ import fnmatch
import logging.handlers
import struct
import tempfile
-import _testcapi
try:
import _thread, threading
@@ -1373,6 +1372,7 @@ _TPFLAGS_HAVE_GC = 1<<14
_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\
@@ -2172,4 +2172,5 @@ def run_in_subinterp(code):
raise unittest.SkipTest("run_in_subinterp() cannot be used "
"if tracemalloc module is tracing "
"memory allocations")
+ import _testcapi
return _testcapi.run_in_subinterp(code)