cpython/Lib/importlib/test/regrtest.py
Brett Cannon fd0741555b Issue #2377: Make importlib the implementation of __import__().
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__().
2012-04-14 14:10:13 -04:00

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)