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