From 51931144427faa001a6db3cfc37380526be256b6 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 5 May 2000 14:27:39 +0000 Subject: [PATCH] Alas, Vladimir's patch was too aggressive, and started causing really weird errors. (E.g. see thread "weird bug in test_winreg" in python-dev.) Since it's actually useful to be able to re-run an individual test after running test.autotest, we keep the unloading code, but only for modules whose full name starts with "test.". --- Lib/test/regrtest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index 924890ab76f..86b3d9a2c22 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -121,7 +121,7 @@ def main(tests=None, testdir=None): skipped.append(test) # Unload the newly imported modules (best effort finalization) for module in sys.modules.keys(): - if module not in save_modules: + if module not in save_modules and module.startswith("test."): test_support.unload(module) if good and not quiet: if not bad and not skipped and len(good) > 1: