Fred Drake | d74804d | 2001-01-22 19:38:37 +0000 | [diff] [blame] | 1 | """Do a minimal test of all the modules that aren't otherwise tested.""" |
Tim Peters | d93c0b6 | 2001-01-19 05:41:36 +0000 | [diff] [blame] | 2 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 3 | from test import test_support |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 4 | import sys |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 5 | import unittest |
Fred Drake | b112481 | 2001-10-25 18:11:10 +0000 | [diff] [blame] | 6 | import warnings |
Fred Drake | b112481 | 2001-10-25 18:11:10 +0000 | [diff] [blame] | 7 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 8 | class TestUntestedModules(unittest.TestCase): |
| 9 | def test_at_least_import_untested_modules(self): |
| 10 | with test_support.catch_warning(): |
| 11 | import BaseHTTPServer |
| 12 | import DocXMLRPCServer |
| 13 | import CGIHTTPServer |
| 14 | import SimpleHTTPServer |
| 15 | import SimpleXMLRPCServer |
| 16 | import aifc |
| 17 | import bdb |
| 18 | import cgitb |
| 19 | import cmd |
| 20 | import code |
| 21 | import compileall |
Tim Peters | f87d857 | 2001-01-23 09:50:30 +0000 | [diff] [blame] | 22 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 23 | import distutils.archive_util |
| 24 | import distutils.bcppcompiler |
| 25 | import distutils.ccompiler |
| 26 | import distutils.cmd |
| 27 | import distutils.core |
| 28 | import distutils.cygwinccompiler |
| 29 | import distutils.dep_util |
| 30 | import distutils.dir_util |
| 31 | import distutils.emxccompiler |
| 32 | import distutils.errors |
| 33 | import distutils.extension |
| 34 | import distutils.file_util |
| 35 | import distutils.filelist |
| 36 | import distutils.log |
| 37 | if sys.platform.startswith('win'): |
| 38 | import distutils.msvccompiler |
| 39 | import distutils.mwerkscompiler |
| 40 | import distutils.sysconfig |
| 41 | import distutils.text_file |
| 42 | import distutils.unixccompiler |
| 43 | import distutils.util |
| 44 | import distutils.version |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 45 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 46 | import distutils.command.bdist_dumb |
| 47 | if sys.platform.startswith('win'): |
| 48 | import distutils.command.bdist_msi |
| 49 | import distutils.command.bdist |
| 50 | import distutils.command.bdist_rpm |
| 51 | import distutils.command.bdist_wininst |
| 52 | import distutils.command.build_clib |
| 53 | import distutils.command.build_ext |
| 54 | import distutils.command.build |
| 55 | import distutils.command.build_py |
| 56 | import distutils.command.build_scripts |
| 57 | import distutils.command.clean |
| 58 | import distutils.command.config |
| 59 | import distutils.command.install_data |
| 60 | import distutils.command.install_egg_info |
| 61 | import distutils.command.install_headers |
| 62 | import distutils.command.install_lib |
| 63 | import distutils.command.install |
| 64 | import distutils.command.install_scripts |
| 65 | import distutils.command.register |
| 66 | import distutils.command.sdist |
| 67 | import distutils.command.upload |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 68 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 69 | import encodings |
| 70 | import formatter |
| 71 | import ftplib |
| 72 | import getpass |
| 73 | import htmlentitydefs |
| 74 | import ihooks |
| 75 | import imghdr |
| 76 | import imputil |
| 77 | import keyword |
| 78 | import linecache |
| 79 | import macurl2path |
| 80 | import mailcap |
| 81 | import mutex |
| 82 | import nntplib |
| 83 | import nturl2path |
| 84 | import opcode |
| 85 | import os2emxpath |
| 86 | import pdb |
| 87 | import pstats |
| 88 | import py_compile |
| 89 | import pydoc |
| 90 | import rlcompleter |
| 91 | import sched |
| 92 | import smtplib |
| 93 | import sndhdr |
| 94 | import statvfs |
| 95 | import sunau |
| 96 | import sunaudio |
| 97 | import symbol |
| 98 | import tabnanny |
| 99 | import telnetlib |
| 100 | import timeit |
| 101 | import token |
| 102 | try: |
| 103 | import tty # not available on Windows |
| 104 | except ImportError: |
| 105 | if test_support.verbose: |
| 106 | print("skipping tty") |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 107 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 108 | # Can't test the "user" module -- if the user has a ~/.pythonrc.py, it |
| 109 | # can screw up all sorts of things (esp. if it prints!). |
| 110 | #import user |
| 111 | import webbrowser |
| 112 | import xml |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 113 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame^] | 114 | |
| 115 | def test_main(): |
| 116 | test_support.run_unittest(TestUntestedModules) |
| 117 | |
| 118 | if __name__ == "__main__": |
| 119 | test_main() |