MCPcopy Index your code
hub / github.com/RustPython/RustPython / test_html_doc

Method test_html_doc

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

Source from the content-addressed store, hash-verified

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

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