mirror of
https://github.com/GothenburgBitFactory/taskwarrior.git
synced 2025-07-07 20:06:36 +02:00
Unittest - Fix newlines should be interpreted in printed output
This commit is contained in:
parent
f5b778b800
commit
f39617a753
1 changed files with 3 additions and 0 deletions
|
@ -66,6 +66,9 @@ class TAPTestResult(unittest.result.TestResult):
|
||||||
def _do_stream(data, stream):
|
def _do_stream(data, stream):
|
||||||
"""Helper function for _mergeStdout"""
|
"""Helper function for _mergeStdout"""
|
||||||
for line in data.splitlines(True):
|
for line in data.splitlines(True):
|
||||||
|
# newlines should be taken literally and be comments in TAP
|
||||||
|
line = line.replace("\\n", "\n# ")
|
||||||
|
|
||||||
# Add a comment sign before each line
|
# Add a comment sign before each line
|
||||||
if line.startswith("#"):
|
if line.startswith("#"):
|
||||||
stream.write(line)
|
stream.write(line)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue