Verified Commit f9470e4a authored by Justin Carpentier's avatar 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
......@@ -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:
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__':
Markdown is supported
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