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: textwrap: declining indent level has no test case
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: emilyemorehouse Nosy List: Mariatta, emilyemorehouse, jonathaneunice
Priority: normal Keywords:

Created on 2017-06-08 21:12 by jonathaneunice, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2014 merged jonathaneunice, 2017-06-08 21:36
PR 2064 merged jonathaneunice, 2017-06-10 04:17
PR 2206 merged jonathaneunice, 2017-06-15 01:11
Messages (6)
msg295464 - (view) Author: Jonathan Eunice (jonathaneunice) * Date: 2017-06-08 21:12
The case where textwrap.dedent() handles a declining indent level, requiring it to revise its margin estimate downward, remains untested.

This issue is opened in support of an imminent PR that adds an appropriate test.
msg295746 - (view) Author: Emily Morehouse (emilyemorehouse) * (Python committer) Date: 2017-06-12 06:03
Good catch. We should also add additional tests for a declining indentation level with a blank line and a declining indentation with a whitespace only line, as it is a pattern followed throughout the dedent tests. 

It should be noted that PR 2014 is the appropriate pull request for this issue. PR 2064 is for a different, though related, issue (
msg295951 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-13 19:04
New changeset 601483d3b8a0433ca25f7fd6beea2cef674be039 by Mariatta (Jonathan Eunice) in branch 'master':
bpo-30603: Add test case to textwrap.dedent (GH-2014)
msg296063 - (view) Author: Jonathan Eunice (jonathaneunice) * Date: 2017-06-15 04:02
@emilyemorehouse Added new tests per your request:
msg296111 - (view) Author: Emily Morehouse (emilyemorehouse) * (Python committer) Date: 2017-06-15 16:04
Looks great, thanks for the updates.

Mariatta, can you get this merged in?
msg296144 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2017-06-16 02:18
New changeset 214f7eed7640f873223427c02a95a70775d2b396 by Mariatta (Jonathan Eunice) in branch 'master':
bpo-30603: add tests to textwrap.dedent (GH-2206)
Date User Action Args
2022-04-11 14:58:47adminsetgithub: 74788
2017-06-16 02:20:49Mariattasetstatus: open -> closed
resolution: fixed
stage: resolved
2017-06-16 02:18:56Mariattasetmessages: + msg296144
2017-06-15 16:04:52emilyemorehousesetmessages: + msg296111
2017-06-15 04:02:26jonathaneunicesetmessages: + msg296063
2017-06-15 01:11:20jonathaneunicesetpull_requests: + pull_request2250
2017-06-13 19:04:12Mariattasetnosy: + Mariatta
messages: + msg295951
2017-06-12 06:03:34emilyemorehousesetmessages: + msg295746
2017-06-12 05:14:17rhettingersetassignee: emilyemorehouse

nosy: + emilyemorehouse
2017-06-10 04:17:35jonathaneunicesetpull_requests: + pull_request2128
2017-06-08 21:36:37jonathaneunicesetpull_requests: + pull_request2079
2017-06-08 21:12:09jonathaneunicecreate