File tree 1 file changed +7
-3
lines changed
Lib/test/test_interpreters 1 file changed +7
-3
lines changed Original file line number Diff line number Diff line change 17
17
import warnings
18
18
19
19
from test import support
20
- from test .support import os_helper
21
- from test .support import import_helper
22
20
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 ))
24
27
from test .support import interpreters
25
28
26
29
@@ -399,6 +402,7 @@ def ensure_closed(fd):
399
402
def temp_dir (self ):
400
403
tempdir = tempfile .mkdtemp ()
401
404
tempdir = os .path .realpath (tempdir )
405
+ from test .support import os_helper
402
406
self .addCleanup (lambda : os_helper .rmtree (tempdir ))
403
407
return tempdir
404
408
You can’t perform that action at this time.
0 commit comments