| 1 | n/a | """Do a minimal test of all the modules that aren't otherwise tested.""" | 
|---|
| 2 | n/a | import importlib | 
|---|
| 3 | n/a | import sys | 
|---|
| 4 | n/a | from test import support | 
|---|
| 5 | n/a | import unittest | 
|---|
| 6 | n/a |  | 
|---|
| 7 | n/a | class TestUntestedModules(unittest.TestCase): | 
|---|
| 8 | n/a | def test_untested_modules_can_be_imported(self): | 
|---|
| 9 | n/a | untested = ('bdb', 'encodings', 'formatter', | 
|---|
| 10 | n/a | 'nturl2path', 'tabnanny') | 
|---|
| 11 | n/a | with support.check_warnings(quiet=True): | 
|---|
| 12 | n/a | for name in untested: | 
|---|
| 13 | n/a | try: | 
|---|
| 14 | n/a | support.import_module('test.test_{}'.format(name)) | 
|---|
| 15 | n/a | except unittest.SkipTest: | 
|---|
| 16 | n/a | importlib.import_module(name) | 
|---|
| 17 | n/a | else: | 
|---|
| 18 | n/a | self.fail('{} has tests even though test_sundry claims ' | 
|---|
| 19 | n/a | 'otherwise'.format(name)) | 
|---|
| 20 | n/a |  | 
|---|
| 21 | n/a | import distutils.bcppcompiler | 
|---|
| 22 | n/a | import distutils.ccompiler | 
|---|
| 23 | n/a | import distutils.cygwinccompiler | 
|---|
| 24 | n/a | import distutils.filelist | 
|---|
| 25 | n/a | import distutils.text_file | 
|---|
| 26 | n/a | import distutils.unixccompiler | 
|---|
| 27 | n/a |  | 
|---|
| 28 | n/a | import distutils.command.bdist_dumb | 
|---|
| 29 | n/a | if sys.platform.startswith('win'): | 
|---|
| 30 | n/a | import distutils.command.bdist_msi | 
|---|
| 31 | n/a | import distutils.command.bdist | 
|---|
| 32 | n/a | import distutils.command.bdist_rpm | 
|---|
| 33 | n/a | import distutils.command.bdist_wininst | 
|---|
| 34 | n/a | import distutils.command.build_clib | 
|---|
| 35 | n/a | import distutils.command.build_ext | 
|---|
| 36 | n/a | import distutils.command.build | 
|---|
| 37 | n/a | import distutils.command.clean | 
|---|
| 38 | n/a | import distutils.command.config | 
|---|
| 39 | n/a | import distutils.command.install_data | 
|---|
| 40 | n/a | import distutils.command.install_egg_info | 
|---|
| 41 | n/a | import distutils.command.install_headers | 
|---|
| 42 | n/a | import distutils.command.install_lib | 
|---|
| 43 | n/a | import distutils.command.register | 
|---|
| 44 | n/a | import distutils.command.sdist | 
|---|
| 45 | n/a | import distutils.command.upload | 
|---|
| 46 | n/a |  | 
|---|
| 47 | n/a | import html.entities | 
|---|
| 48 | n/a |  | 
|---|
| 49 | n/a | try: | 
|---|
| 50 | n/a | import tty  # Not available on Windows | 
|---|
| 51 | n/a | except ImportError: | 
|---|
| 52 | n/a | if support.verbose: | 
|---|
| 53 | n/a | print("skipping tty") | 
|---|
| 54 | n/a |  | 
|---|
| 55 | n/a |  | 
|---|
| 56 | n/a | if __name__ == "__main__": | 
|---|
| 57 | n/a | unittest.main() | 
|---|