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