20
20
from test .libregrtest .setup import setup_tests
21
21
from test .libregrtest .utils import removepy , count , format_duration , printlist
22
22
from test import support
23
- from test .support import os_helper
24
23
25
24
26
25
# When tests are run from the Python build directory, it is best practice
@@ -200,7 +199,7 @@ def find_tests(self, tests):
200
199
# regex to match 'test_builtin' in line:
201
200
# '0:00:00 [ 4/400] test_builtin -- test_dict took 1 sec'
202
201
regex = re .compile (r'\btest_[a-zA-Z0-9_]+\b' )
203
- with open (os .path .join (os_helper .SAVEDCWD , self .ns .fromfile )) as fp :
202
+ with open (os .path .join (support .SAVEDCWD , self .ns .fromfile )) as fp :
204
203
for line in fp :
205
204
line = line .split ('#' , 1 )[0 ]
206
205
line = line .strip ()
@@ -543,7 +542,7 @@ def save_xml_result(self):
543
542
for k , v in totals .items ():
544
543
root .set (k , str (v ))
545
544
546
- xmlpath = os .path .join (os_helper .SAVEDCWD , self .ns .xmlpath )
545
+ xmlpath = os .path .join (support .SAVEDCWD , self .ns .xmlpath )
547
546
with open (xmlpath , 'wb' ) as f :
548
547
for s in ET .tostringlist (root ):
549
548
f .write (s )
@@ -569,8 +568,8 @@ def main(self, tests=None, **kwargs):
569
568
# Run the tests in a context manager that temporarily changes the CWD to a
570
569
# temporary and writable directory. If it's not possible to create or
571
570
# change the CWD, the original CWD will be used. The original CWD is
572
- # available from os_helper .SAVEDCWD.
573
- with os_helper .temp_cwd (test_cwd , quiet = True ):
571
+ # available from support .SAVEDCWD.
572
+ with support .temp_cwd (test_cwd , quiet = True ):
574
573
self ._main (tests , kwargs )
575
574
576
575
def getloadavg (self ):
0 commit comments