[New-bugs-announce] [issue47042] Fix test_html_doc in test_pydoc

Serhiy Storchaka report at bugs.python.org
Thu Mar 17 06:57:10 EDT 2022


New submission from Serhiy Storchaka <storchaka+cpython at gmail.com>:

Due to missed splitlines() in test_pydoc the HTML output was not tested correctly. Instead of testing that the actual output contains every *line* from the expected output it tested that the actual output contains every *character* from the expected output. The test would pass with any actual output which contains all Latin letters and some punctuation.

The following PR fixes this bug and makes the test even more strict. Now it tests that the actual output contains the same lines as the expected output, in the same order, ignoring indentation and empty lines.

----------
components: Tests
messages: 415396
nosy: serhiy.storchaka
priority: normal
severity: normal
status: open
title: Fix test_html_doc in test_pydoc
type: behavior
versions: Python 3.10, Python 3.11, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue47042>
_______________________________________


More information about the New-bugs-announce mailing list