Skip to content

Commit 14d080e

Browse files
committed
#16259: delete some no-longer-used code from regrtest.
dash_R is only called from one location, and from that location an indirect_test is passed.
1 parent 52f80a7 commit 14d080e

File tree

1 file changed

+1
-9
lines changed

1 file changed

+1
-9
lines changed

Lib/test/regrtest.py

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1386,14 +1386,6 @@ def dash_R(the_module, test, indirect_test, huntrleaks):
13861386
for obj in abc.__subclasses__() + [abc]:
13871387
abcs[obj] = obj._abc_registry.copy()
13881388

1389-
if indirect_test:
1390-
def run_the_test():
1391-
indirect_test()
1392-
else:
1393-
def run_the_test():
1394-
del sys.modules[the_module.__name__]
1395-
exec('import ' + the_module.__name__)
1396-
13971389
nwarmup, ntracked, fname = huntrleaks
13981390
fname = os.path.join(support.SAVEDCWD, fname)
13991391
repcount = nwarmup + ntracked
@@ -1404,7 +1396,7 @@ def run_the_test():
14041396
print(("1234567890"*(repcount//10 + 1))[:repcount], file=sys.stderr)
14051397
sys.stderr.flush()
14061398
for i in range(repcount):
1407-
run_the_test()
1399+
indirect_test()
14081400
alloc_after, rc_after = dash_R_cleanup(fs, ps, pic, zdc, abcs)
14091401
sys.stderr.write('.')
14101402
sys.stderr.flush()

0 commit comments

Comments
 (0)