Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Stack Of Tasks
pinocchio
Commits
f9470e4a
Verified
Commit
f9470e4a
authored
Nov 23, 2019
by
Justin Carpentier
Browse files
test/python: fix potential bug and warning in Python3
parent
8435aefe
Pipeline
#6930
failed with stage
in 203 minutes and 19 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
unittest/python/bindings_model.py
View file @
f9470e4a
...
...
@@ -12,9 +12,13 @@ class TestModel(TestCase):
import
pickle
model
=
self
.
model
pickle
.
dump
(
model
,
open
(
"save.p"
,
"wb"
)
)
filename
=
"model.pickle"
with
open
(
filename
,
'wb'
)
as
f
:
pickle
.
dump
(
model
,
f
)
model_copy
=
pickle
.
load
(
open
(
"save.p"
,
"rb"
)
)
with
open
(
filename
,
'rb'
)
as
f
:
model_copy
=
pickle
.
load
(
f
)
self
.
assertTrue
(
model
==
model_copy
)
if
__name__
==
'__main__'
:
...
...
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