예제 #1
0
def test_mutable():
    sm = StoreMixin()
    sm.open_storage(MemoryStoragePlugin(None), 'ns')
    sm['toto'] = [1, 3]

    with sm.mutable('toto') as titi:
        titi[1] = 5

    assert sm['toto'] == [1, 5]
예제 #2
0
def test_mutable():
    sm = StoreMixin()
    sm.open_storage(MemoryStoragePlugin(None), "ns")
    sm["toto"] = [1, 3]

    with sm.mutable("toto") as titi:
        titi[1] = 5

    assert sm["toto"] == [1, 5]