Unittest - Fix newlines should be interpreted in printed output
This commit is contained in:
@@ -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)
|
||||||
|
|||||||
Reference in New Issue
Block a user