blob: 2988d749a50a648be4c35b552039801340e46006 [file] [log] [blame]
Brett Cannon5e129db2009-08-27 23:52:35 +00001"""Run Python's standard test suite using importlib.__import__.
2
3XXX FAILING
4 test___all__ # tuple being given for fromlist (looks like interpreter is
5 doing it)
6 test_builtin # Wanting a TypeError for an integer name
7 test_import # execution bit, exception name differing, file name differing
8 between code and module (?)
9 test_importhooks # package not set in _gcd_import() but level > 0
10 test_pep3120 # Difference in exception
11 test_runpy # Importing sys.imp.eric raises AttributeError instead of
12 ImportError (as does any attempt to import a sub-module
13 from a non-package, e.g. tokenize.menotreal)
14
15"""
16import importlib
17import sys
18from test import regrtest
19
20if __name__ == '__main__':
21 __builtins__.__import__ = importlib.__import__
22
23 exclude = ['--exclude',
24 'test_frozen', # Does not expect __loader__ attribute
25 'test_pkg', # Does not expect __loader__ attribute
26 'test_pydoc', # Does not expect __loader__ attribute
27 ]
28 # No programmatic way to specify tests to exclude
29 sys.argv.extend(exclude)
30
31 # verbose=True, quiet=False for all failure info
32 # tests=[...] for specific tests to run
33 regrtest.main(quiet=True)