Terry J. Reedy added the comment: Patch attached with current version. I noted in a comment that we should probably replace some of format_paragraph with textwrap.wrap.
The find_paragraph test works fine with the current text mock. I split one test method and will probably do more. It could be considered a bug that find_paragraph included the hidden terminal \n when it finds the final line of the text and that line has no \n. Since that is a fairly unrealistic test case, we might do better to add \n on all test snippets. Certainly, adding \n\n is a bug. I have the impression from what I have looked at so far is that triple quoted strings are not handled as they should be. I opened #18583 for enhancing the module beyond what we have done here. ---------- components: +IDLE Added file: http://bugs.python.org/file31070/18226FormatPara7.diff _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue18226> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com