mirror of
https://github.com/python/cpython.git
synced 2025-10-26 11:14:33 +00:00
gh-64327: Remove skipped pydoc tests (#139512)
Tests skipped since 2014:
since commit a46ef70bdf.
This commit is contained in:
parent
41712c4e09
commit
efd223da0c
1 changed files with 0 additions and 41 deletions
|
|
@ -1334,47 +1334,6 @@ def test_url_search_package_error(self):
|
||||||
finally:
|
finally:
|
||||||
sys.path[:] = saved_paths
|
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):
|
def test_importfile(self):
|
||||||
try:
|
try:
|
||||||
loaded_pydoc = pydoc.importfile(pydoc.__file__)
|
loaded_pydoc = pydoc.importfile(pydoc.__file__)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue