bpo-40275: Use new test.support helper submodules in tests (GH-20849)
diff --git a/Lib/test/libregrtest/runtest.py b/Lib/test/libregrtest/runtest.py
index 9338b28..e46cc31 100644
--- a/Lib/test/libregrtest/runtest.py
+++ b/Lib/test/libregrtest/runtest.py
@@ -11,6 +11,8 @@
import unittest
from test import support
+from test.support import import_helper
+from test.support import os_helper
from test.libregrtest.refleak import dash_R, clear_caches
from test.libregrtest.save_env import saved_test_environment
from test.libregrtest.utils import format_duration, print_warning
@@ -216,7 +218,7 @@
abstest = get_abs_module(ns, test_name)
# remove the module from sys.module to reload it if it was already imported
- support.unload(abstest)
+ import_helper.unload(abstest)
the_module = importlib.import_module(abstest)
@@ -313,7 +315,7 @@
# since if a test leaves a file open, it cannot be deleted by name (while
# there's nothing we can do about that here either, we can display the
# name of the offending test, which is a real help).
- for name in (support.TESTFN,):
+ for name in (os_helper.TESTFN,):
if not os.path.exists(name):
continue