Issue #23839: Various caches now are cleared before running every test file.
diff --git a/Lib/test/libregrtest/runtest.py b/Lib/test/libregrtest/runtest.py
index 6282543..ba0df0a 100644
--- a/Lib/test/libregrtest/runtest.py
+++ b/Lib/test/libregrtest/runtest.py
@@ -7,7 +7,7 @@
import traceback
import unittest
from test import support
-from test.libregrtest.refleak import dash_R
+from test.libregrtest.refleak import dash_R, clear_caches
from test.libregrtest.save_env import saved_test_environment
@@ -146,6 +146,7 @@
else:
# Always import it from the test package
abstest = 'test.' + test
+ clear_caches()
with saved_test_environment(test, ns.verbose, ns.quiet, pgo=ns.pgo) as environment:
start_time = time.time()
the_module = importlib.import_module(abstest)