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