(root)/
Python-3.12.0/
Lib/
test/
test_sundry.py
       1  """Do a minimal test of all the modules that aren't otherwise tested."""
       2  import importlib
       3  from test import support
       4  from test.support import import_helper
       5  from test.support import warnings_helper
       6  import unittest
       7  
       8  class ESC[4;38;5;81mTestUntestedModules(ESC[4;38;5;149munittestESC[4;38;5;149m.ESC[4;38;5;149mTestCase):
       9      def test_untested_modules_can_be_imported(self):
      10          untested = ('encodings',)
      11          with warnings_helper.check_warnings(quiet=True):
      12              for name in untested:
      13                  try:
      14                      import_helper.import_module('test.test_{}'.format(name))
      15                  except unittest.SkipTest:
      16                      importlib.import_module(name)
      17                  else:
      18                      self.fail('{} has tests even though test_sundry claims '
      19                                'otherwise'.format(name))
      20  
      21              import html.entities
      22  
      23              try:
      24                  import tty  # Not available on Windows
      25              except ImportError:
      26                  if support.verbose:
      27                      print("skipping tty")
      28  
      29  
      30  if __name__ == "__main__":
      31      unittest.main()