A quick and dirty implementation of html2text. Tailored for pydoc tests only.
(html)
| 365 | |
| 366 | |
| 367 | def html2text(html): |
| 368 | """A quick and dirty implementation of html2text. |
| 369 | |
| 370 | Tailored for pydoc tests only. |
| 371 | """ |
| 372 | html = html.replace("<dd>", "\n") |
| 373 | html = html.replace("<hr>", "-"*70) |
| 374 | html = re.sub("<.*?>", "", html) |
| 375 | html = pydoc.replace(html, " ", " ", ">", ">", "<", "<") |
| 376 | return html |
| 377 | |
| 378 | |
| 379 | class PydocBaseTest(unittest.TestCase): |
no test coverage detected
searching dependent graphs…