Message366574
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 |
|
Date |
User |
Action |
Args |
2020-04-16 02:30:42 | steven.daprano | set | recipients:
+ steven.daprano, serhiy.storchaka, Filip Rembiałkowski |
2020-04-16 02:30:42 | steven.daprano | set | messageid: <1587004242.35.0.960808010223.issue40295@roundup.psfhosted.org> |
2020-04-16 02:30:42 | steven.daprano | link | issue40295 messages |
2020-04-16 02:30:42 | steven.daprano | create | |
|