File tree Expand file tree Collapse file tree 1 file changed +7
-3
lines changed
Lib/test/test_interpreters Expand file tree Collapse file tree 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 1717import warnings
1818
1919from test import support
20- from test .support import os_helper
21- from test .support import import_helper
2220
23- _interpreters = import_helper .import_module ('_xxsubinterpreters' )
21+ # We would use test.support.import_helper.import_module(),
22+ # but the indirect import of test.support.os_helper causes refleaks.
23+ try :
24+ import _xxsubinterpreters as _interpreters
25+ except ImportError as exc :
26+ raise unittest .SkipTest (str (exc ))
2427from test .support import interpreters
2528
2629
@@ -399,6 +402,7 @@ def ensure_closed(fd):
399402 def temp_dir (self ):
400403 tempdir = tempfile .mkdtemp ()
401404 tempdir = os .path .realpath (tempdir )
405+ from test .support import os_helper
402406 self .addCleanup (lambda : os_helper .rmtree (tempdir ))
403407 return tempdir
404408
You can’t perform that action at this time.
0 commit comments