Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
IPDSnelting
mjtest
Commits
a5729b73
Commit
a5729b73
authored
Dec 17, 2018
by
Andreas Fried
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Do not use errors argument when opening a binary file.
parent
ef323b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
mjtest/test/ast_tests.py
mjtest/test/ast_tests.py
+1
-1
No files found.
mjtest/test/ast_tests.py
View file @
a5729b73
...
...
@@ -58,7 +58,7 @@ class ASTPrettyPrintTest(BasicSyntaxTest):
def
_pretty_print
(
self
,
input_file
:
str
,
output_file
:
str
)
->
Tuple
[
int
,
str
,
str
]:
out
,
err
,
rtcode
=
self
.
env
.
run_mj_command
(
TestMode
.
ast
,
input_file
)
with
open
(
output_file
,
"wb"
,
errors
=
"backslashreplace"
)
as
f
:
with
open
(
output_file
,
"wb"
)
as
f
:
f
.
write
(
out
)
f
.
flush
()
return
rtcode
,
decode
(
out
),
decode
(
err
)
...
...
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