gh-64327: Remove skipped pydoc tests (#139512)

Tests skipped since 2014:
since commit a46ef70bdf.
This commit is contained in:
Victor Stinner 2025-10-05 12:49:03 +02:00 committed by GitHub
parent 41712c4e09
commit efd223da0c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -1334,47 +1334,6 @@ def test_url_search_package_error(self):
finally:
sys.path[:] = saved_paths
@unittest.skip('causes undesirable side-effects (#20128)')
def test_modules(self):
# See Helper.listmodules().
num_header_lines = 2
num_module_lines_min = 5 # Playing it safe.
num_footer_lines = 3
expected = num_header_lines + num_module_lines_min + num_footer_lines
output = StringIO()
helper = pydoc.Helper(output=output)
helper('modules')
result = output.getvalue().strip()
num_lines = len(result.splitlines())
self.assertGreaterEqual(num_lines, expected)
@unittest.skip('causes undesirable side-effects (#20128)')
def test_modules_search(self):
# See Helper.listmodules().
expected = 'pydoc - '
output = StringIO()
helper = pydoc.Helper(output=output)
with captured_stdout() as help_io:
helper('modules pydoc')
result = help_io.getvalue()
self.assertIn(expected, result)
@unittest.skip('some buildbots are not cooperating (#20128)')
def test_modules_search_builtin(self):
expected = 'gc - '
output = StringIO()
helper = pydoc.Helper(output=output)
with captured_stdout() as help_io:
helper('modules garbage')
result = help_io.getvalue()
self.assertStartsWith(result, expected)
def test_importfile(self):
try:
loaded_pydoc = pydoc.importfile(pydoc.__file__)