MCPcopy Index your code
hub / github.com/python/cpython / test_html_doc

Method test_html_doc

Lib/test/test_pydoc/test_pydoc.py:422–435  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

420 'trace function introduces __locals__ unexpectedly')
421 @requires_docstrings
422 def test_html_doc(self):
423 result, doc_loc = get_pydoc_html(pydoc_mod)
424 text_result = html2text(result)
425 text_lines = [line.strip() for line in text_result.splitlines()]
426 text_lines = [line for line in text_lines if line]
427 del text_lines[1]
428 expected_lines = html2text_of_expected.splitlines()
429 expected_lines = [line.strip() for line in expected_lines if line]
430 self.assertEqual(text_lines, expected_lines)
431 mod_file = inspect.getabsfile(pydoc_mod)
432 mod_url = urllib.parse.quote(mod_file)
433 self.assertIn(mod_url, result)
434 self.assertIn(mod_file, result)
435 self.assertIn(doc_loc, result)
436
437 @unittest.skipIf(hasattr(sys, 'gettrace') and sys.gettrace(),
438 'trace function introduces __locals__ unexpectedly')

Callers

nothing calls this directly

Calls 7

get_pydoc_htmlFunction · 0.85
html2textFunction · 0.85
quoteMethod · 0.80
assertInMethod · 0.80
stripMethod · 0.45
splitlinesMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected