mirror of
https://github.com/SheffieldML/GPy.git
synced 2026-04-28 14:26:23 +02:00
Update pickle_tests.py
This commit is contained in:
parent
1e3ad59f5e
commit
55fb393751
1 changed files with 9 additions and 6 deletions
|
|
@ -59,14 +59,17 @@ class Test(ListDictTestCase):
|
|||
f.seek(0)
|
||||
pio2 = pickle.load(f)
|
||||
self.assertListDictEquals(pio._properties, pio2._properties)
|
||||
|
||||
with tempfile.TemporaryFile('w+b') as f:
|
||||
|
||||
f = tempfile.TemporaryFile('w+b')
|
||||
|
||||
with f:
|
||||
pickle.dump(piov, f)
|
||||
f.seek(0)
|
||||
pio2 = pickle.load(f)
|
||||
#py3 fix
|
||||
#self.assertListDictEquals(dict(piov.items()), dict(pio2.iteritems()))
|
||||
self.assertListDictEquals(dict(piov.items()), dict(pio2.items()))
|
||||
|
||||
pio2 = GPy.load(f)
|
||||
#py3 fix
|
||||
#self.assertListDictEquals(dict(piov.items()), dict(pio2.iteritems()))
|
||||
self.assertListDictEquals(dict(piov.items()), dict(pio2.items()))
|
||||
|
||||
def test_param(self):
|
||||
param = Param('test', np.arange(4*2).reshape(4,2))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue