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 | |
Benjamin Peterson | ee8712c | 2008-05-20 21:35:26 +0000 | [diff] [blame] | 3 | from test import 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 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 7 | class TestUntestedModules(unittest.TestCase): |
| 8 | def test_at_least_import_untested_modules(self): |
Florent Xicluna | 41fe615 | 2010-04-02 18:52:12 +0000 | [diff] [blame] | 9 | with support.check_warnings(quiet=True): |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 10 | import bdb |
| 11 | import cgitb |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 12 | import code |
| 13 | import compileall |
Tim Peters | f87d857 | 2001-01-23 09:50:30 +0000 | [diff] [blame] | 14 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 15 | import distutils.bcppcompiler |
| 16 | import distutils.ccompiler |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 17 | import distutils.cygwinccompiler |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 18 | import distutils.emxccompiler |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 19 | import distutils.filelist |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 20 | if sys.platform.startswith('win'): |
| 21 | import distutils.msvccompiler |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 22 | import distutils.text_file |
| 23 | import distutils.unixccompiler |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 24 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 25 | import distutils.command.bdist_dumb |
| 26 | if sys.platform.startswith('win'): |
| 27 | import distutils.command.bdist_msi |
| 28 | import distutils.command.bdist |
| 29 | import distutils.command.bdist_rpm |
| 30 | import distutils.command.bdist_wininst |
| 31 | import distutils.command.build_clib |
| 32 | import distutils.command.build_ext |
| 33 | import distutils.command.build |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 34 | import distutils.command.clean |
| 35 | import distutils.command.config |
| 36 | import distutils.command.install_data |
| 37 | import distutils.command.install_egg_info |
| 38 | import distutils.command.install_headers |
| 39 | import distutils.command.install_lib |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 40 | import distutils.command.register |
| 41 | import distutils.command.sdist |
| 42 | import distutils.command.upload |
Guido van Rossum | cd16bf6 | 2007-06-13 18:07:49 +0000 | [diff] [blame] | 43 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 44 | import encodings |
| 45 | import formatter |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 46 | import getpass |
Fred Drake | 3c50ea4 | 2008-05-17 22:02:32 +0000 | [diff] [blame] | 47 | import html.entities |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 48 | import imghdr |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 49 | import keyword |
| 50 | import linecache |
| 51 | import macurl2path |
| 52 | import mailcap |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 53 | import nntplib |
| 54 | import nturl2path |
| 55 | import opcode |
| 56 | import os2emxpath |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 57 | import pstats |
| 58 | import py_compile |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 59 | import sndhdr |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 60 | import symbol |
| 61 | import tabnanny |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 62 | import timeit |
| 63 | import token |
| 64 | try: |
| 65 | import tty # not available on Windows |
| 66 | except ImportError: |
Benjamin Peterson | ee8712c | 2008-05-20 21:35:26 +0000 | [diff] [blame] | 67 | if support.verbose: |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 68 | print("skipping tty") |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 69 | import webbrowser |
| 70 | import xml |
Thomas Wouters | 49fd7fa | 2006-04-21 10:40:58 +0000 | [diff] [blame] | 71 | |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 72 | |
| 73 | def test_main(): |
Benjamin Peterson | ee8712c | 2008-05-20 21:35:26 +0000 | [diff] [blame] | 74 | support.run_unittest(TestUntestedModules) |
Christian Heimes | 5e69685 | 2008-04-09 08:37:03 +0000 | [diff] [blame] | 75 | |
| 76 | if __name__ == "__main__": |
| 77 | test_main() |