mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
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.".
This commit is contained in:
parent
706262bde0
commit
5193114442
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue