Exemple #1
0
def test_context_load_save(tempdir, context, temp_phy_config_dir):
    assert not context.load('unexisting')

    context.save('a/hello', {'text': 'world'})
    assert context.load('a/hello')['text'] == 'world'

    context.save('a/hello', {'text': 'world!'}, location='global')
    assert context.load('a/hello', location='global')['text'] == 'world!'
Exemple #2
0
def test_context_load_save_pickle(tempdir, context, temp_phy_config_dir):
    arr = np.random.rand(10, 10)
    context.save('arr', arr, kind='pickle')
    ae(context.load('arr'), arr)
Exemple #3
0
def test_context_load_save_pickle(tempdir, context, temp_phy_config_dir):
    arr = np.random.rand(10, 10)
    context.save('arr', arr, kind='pickle')
    ae(context.load('arr'), arr)