Commit 7b4adf13 authored by Andreas Fried's avatar Andreas Fried
Browse files

Dump source files by lines, not by characters, when a test fails.

parent a5729b73
......@@ -349,7 +349,7 @@ class ExtensibleTestResult(TestResult):
def add_file(self, title: str, file_name: str, with_line_numbers: bool = True):
with open(file_name, "r", errors="backslashreplace") as f:
file_content = os.linesep.join([line.rstrip() for line in])
file_content = os.linesep.join([line.rstrip() for line in f.readlines()])
self.add_long_text(title, file_content, with_line_numbers)
def succeeded(self):
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment