Exemplo n.º 1
0
def test_read_save_pickle():
    fp = jutil.join_relative_path('../output/tests/test_read_save_pickle.pic')
    d = {'a': 1.0, 'b': 2, 'c': True, 'd': list()}
    jutil.save_pickle(d, fp)
    
    d2 = jutil.load_pickle(fp)
    assert d2['b'] == 2
    
    d3 = jutil.load_pickle('a_non_exits_file_blabla.pic')
    assert d3 is None
Exemplo n.º 2
0
 def load_store(self, path):
     s = jutil.load_pickle(path)
     if s is not None:
         self.storage = s
Exemplo n.º 3
0
 def load_store(self, path):
     s = jutil.load_pickle(path)
     if s is not None:
         self.storage = s