diff options
author | Victor Stinner <vstinner@python.org> | 2021-03-22 22:52:13 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-03-22 22:52:13 (GMT) |
commit | 532e063fc2bf9e6e80550670ddc5dc5d2b1d2450 (patch) | |
tree | 599921f509708f9d212cd64d118df28b272f80ba /Python/dynload_shlib.c | |
parent | 96eeff516204b7cc751103fa33dcc665e387846e (diff) | |
download | cpython-532e063fc2bf9e6e80550670ddc5dc5d2b1d2450.zip cpython-532e063fc2bf9e6e80550670ddc5dc5d2b1d2450.tar.gz cpython-532e063fc2bf9e6e80550670ddc5dc5d2b1d2450.tar.bz2 |
bpo-41718: regrtest saved_test_environment avoids imports (GH-24934)
Reduce the number of modules imported by libregrtest.
saved_test_environment no longer imports modules at startup, but try
to get them from sys.modules. If an module is missing, skip the test.
It also sets directly support.environment_altered.
runtest() now now two saved_test_environment instances: one before
importing the test module, one after importing it.
Remove imports from test.libregrtest.save_env:
* asyncio
* logging
* multiprocessing
* shutil
* sysconfig
* urllib.request
* warnings
When a test method imports a module (ex: warnings) and the test
has a side effect (ex: add a warnings filter), the side effect is not
detected, because the module was not imported when Python
enters the saved_test_environment context manager.
Diffstat (limited to 'Python/dynload_shlib.c')
0 files changed, 0 insertions, 0 deletions