This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Title: Fix test_html_doc in test_pydoc
Type: behavior Stage: resolved
Components: Tests Versions: Python 3.11
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: serhiy.storchaka
Priority: normal Keywords: patch

Created on 2022-03-17 10:57 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 31959 merged serhiy.storchaka, 2022-03-17 11:03
Messages (3)
msg415396 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-17 10:57
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.
msg415426 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-17 16:33
New changeset a5d246066b5352a7d72e70ec0acb643e7c0861fa by Serhiy Storchaka in branch 'main':
bpo-47042: Fix testing the HTML output in test_pydoc (GH-31959)
msg415488 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2022-03-18 12:15
It is 3.11 only issue.
Date User Action Args
2022-04-11 14:59:57adminsetgithub: 91198
2022-03-18 12:15:42serhiy.storchakasetstatus: open -> closed
versions: - Python 3.9, Python 3.10
messages: + msg415488

resolution: fixed
stage: patch review -> resolved
2022-03-17 16:33:01serhiy.storchakasetmessages: + msg415426
2022-03-17 11:04:12serhiy.storchakalinkissue40296 dependencies
2022-03-17 11:03:19serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request30048
2022-03-17 10:57:10serhiy.storchakacreate