mirror of
https://github.com/python/cpython.git
synced 2025-10-28 20:25:04 +00:00
importlib._bootstrap is now frozen into Python/importlib.h and stored as _frozen_importlib in sys.modules. Py_Initialize() loads the frozen code along with sys and imp and then uses _frozen_importlib._install() to set builtins.__import__() w/ _frozen_importlib.__import__().
16 lines
480 B
Python
16 lines
480 B
Python
"""Run Python's standard test suite using importlib.__import__.
|
|
|
|
Tests known to fail because of assumptions that importlib (properly)
|
|
invalidates are automatically skipped if the entire test suite is run.
|
|
Otherwise all command-line options valid for test.regrtest are also valid for
|
|
this script.
|
|
|
|
"""
|
|
import importlib
|
|
import sys
|
|
from test import regrtest
|
|
|
|
if __name__ == '__main__':
|
|
__builtins__.__import__ = importlib.__import__
|
|
|
|
regrtest.main(quiet=True, verbose2=True)
|