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.

Author steven.daprano
Recipients Filip Rembiałkowski, serhiy.storchaka, steven.daprano
Date 2020-04-16.02:30:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1587004242.35.0.960808010223.issue40295@roundup.psfhosted.org>
In-reply-to
Content
Have you tried calling multiline_output() in the REPL?

It does *not* show your expected output:

    # expected
    First line
    Second line


but the string repr():

    # actual
    'First line\nSecond line\n'



Change your doctest to either:


    >>> multiline_output()
    'First line\\nSecond line\\n'

(note that you must escape the backslashes) or:

    >>> print(multiline_output())
    First line
    Second line
    <BLANKLINE>


Note that the "<BLANKLINE>" needs to be written literally, as described here:

https://docs.python.org/3/library/doctest.html#doctest.DONT_ACCEPT_BLANKLINE
History
Date User Action Args
2020-04-16 02:30:42steven.dapranosetrecipients: + steven.daprano, serhiy.storchaka, Filip Rembiałkowski
2020-04-16 02:30:42steven.dapranosetmessageid: <1587004242.35.0.960808010223.issue40295@roundup.psfhosted.org>
2020-04-16 02:30:42steven.dapranolinkissue40295 messages
2020-04-16 02:30:42steven.dapranocreate