From b16cd77eb15f848d5c4d2a0735bfb689e6a3dcd6 Mon Sep 17 00:00:00 2001 From: Hai Shi Date: Fri, 26 Jun 2020 15:07:03 +0800 Subject: [PATCH] Remove all new modules imported by tests --- Lib/test/libregrtest/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/libregrtest/main.py b/Lib/test/libregrtest/main.py index 7675a97b5b48ee..23666c30617c88 100644 --- a/Lib/test/libregrtest/main.py +++ b/Lib/test/libregrtest/main.py @@ -434,7 +434,7 @@ def run_tests_sequential(self): # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): - if module not in save_modules and module.startswith("test."): + if module not in save_modules: support.unload(module) if self.ns.failfast and is_failed(result, self.ns):