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