Stylefixes

This commit is contained in:
Markus Unterwaditzer 2016-04-25 18:54:28 +02:00
parent 8d9efc3014
commit 9081284f02

View file

@ -3,7 +3,7 @@
from copy import deepcopy from copy import deepcopy
from hypothesis import assume from hypothesis import assume
from hypothesis.stateful import Bundle, rule, RuleBasedStateMachine from hypothesis.stateful import Bundle, RuleBasedStateMachine, rule
import hypothesis.strategies as st import hypothesis.strategies as st
import pytest import pytest
@ -421,10 +421,12 @@ class SyncMachine(RuleBasedStateMachine):
storage.items.pop(href, None) storage.items.pop(href, None)
return storage return storage
@rule(target=Status, status=Status, @rule(
a=Storage, b=Storage, target=Status, status=Status,
force_delete=st.booleans(), a=Storage, b=Storage,
conflict_resolution=st.one_of((st.just('a wins'), st.just('b wins')))) force_delete=st.booleans(),
conflict_resolution=st.one_of((st.just('a wins'), st.just('b wins')))
)
def sync(self, status, a, b, force_delete, conflict_resolution): def sync(self, status, a, b, force_delete, conflict_resolution):
try: try:
sync(a, b, status, sync(a, b, status,