PageRenderTime 16ms CodeModel.GetById 9ms app.highlight 5ms RepoModel.GetById 1ms app.codeStats 0ms

/Lib/test/test_sundry.py

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