1"""Do a minimal test of all the modules that aren't otherwise tested.""" 2 3from test import test_support 4import sys 5import unittest 6 7 8class TestUntestedModules(unittest.TestCase): 9 def test_at_least_import_untested_modules(self): 10 with test_support.check_warnings(quiet=True): 11 import CGIHTTPServer 12 import audiodev 13 import bdb 14 import cgitb 15 import code 16 import compileall 17 18 import distutils.bcppcompiler 19 import distutils.ccompiler 20 import distutils.cygwinccompiler 21 import distutils.emxccompiler 22 import distutils.filelist 23 if sys.platform.startswith('win'): 24 import distutils.msvccompiler 25 import distutils.text_file 26 import distutils.unixccompiler 27 28 import distutils.command.bdist_dumb 29 if sys.platform.startswith('win'): 30 import distutils.command.bdist_msi 31 import distutils.command.bdist 32 import distutils.command.bdist_rpm 33 import distutils.command.bdist_wininst 34 import distutils.command.build_clib 35 import distutils.command.build_ext 36 import distutils.command.build 37 import distutils.command.clean 38 import distutils.command.config 39 import distutils.command.install_data 40 import distutils.command.install_egg_info 41 import distutils.command.install_headers 42 import distutils.command.install_lib 43 import distutils.command.register 44 import distutils.command.sdist 45 import distutils.command.upload 46 47 import encodings 48 import formatter 49 import getpass 50 import htmlentitydefs 51 import ihooks 52 import imputil 53 import keyword 54 import linecache 55 import mailcap 56 import mimify 57 import nntplib 58 import nturl2path 59 import opcode 60 import os2emxpath 61 import pdb 62 import posixfile 63 import pstats 64 import py_compile 65 import rexec 66 import sched 67 import sndhdr 68 import statvfs 69 import stringold 70 import sunau 71 import sunaudio 72 import symbol 73 import tabnanny 74 import toaiff 75 import token 76 try: 77 import tty # not available on Windows 78 except ImportError: 79 if test_support.verbose: 80 print "skipping tty" 81 82 # Can't test the "user" module -- if the user has a ~/.pythonrc.py, it 83 # can screw up all sorts of things (esp. if it prints!). 84 #import user 85 import webbrowser 86 import xml 87 88 89def test_main(): 90 test_support.run_unittest(TestUntestedModules) 91 92if __name__ == "__main__": 93 test_main() 94