Example #1
0
def tree_b(redis_store: Store):
    tree = ActionTree(redis_store)
    tree.add_action(ActionB())

    redis_store.add(b_times_ran, 0)
    yield tree
    redis_store.delete(b_times_ran)
Example #2
0
def tree_a(redis_store: Store):
    tree = ActionTree(redis_store)
    tree.add_action(ActionA())

    redis_store.add(a_times_ran, 0)
    yield tree
    redis_store.delete(a_times_ran)
    redis_store.delete(a_result)
Example #3
0
 def test_delete(self, local_store: Store):
     with pytest.raises(StateError):
         local_store.delete("random key")