Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
IPDSnelting
mjtest
Commits
7b4adf13
Commit
7b4adf13
authored
Dec 17, 2018
by
Andreas Fried
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Dump source files by lines, not by characters, when a test fails.
parent
a5729b73
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mjtest/test/tests.py
mjtest/test/tests.py
+1
-1
No files found.
mjtest/test/tests.py
View file @
7b4adf13
...
...
@@ -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
f
.
read
()])
file_content
=
os
.
linesep
.
join
([
line
.
rstrip
()
for
line
in
f
.
read
lines
()])
self
.
add_long_text
(
title
,
file_content
,
with_line_numbers
)
def
succeeded
(
self
):
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment