Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
uwdkn
mjtest
Commits
a5729b73
Commit
a5729b73
authored
Dec 17, 2018
by
Andreas Fried
Browse files
Do not use errors argument when opening a binary file.
parent
ef323b5c
Changes
1
Hide whitespace changes
Inline
Side-by-side
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