Skip to content

Commit

Permalink
Update cairo/tests/utils/strategies.py
Browse files Browse the repository at this point in the history
Co-authored-by: Oba <[email protected]>
  • Loading branch information
enitrat and obatirou authored Jan 17, 2025
1 parent f580eef commit d151834
Showing 1 changed file with 5 additions and 18 deletions.
23 changes: 5 additions & 18 deletions cairo/tests/utils/strategies.py
Original file line number Diff line number Diff line change
Expand Up @@ -357,27 +357,14 @@ def tuple_strategy(thing):
# A strategy for an empty state - the tries have no data.
empty_state = st.builds(
State,
_main_trie=st.builds(
Trie[Address, Optional[Account]],
secured=st.just(True),
default=st.none(),
_data=st.just({}),
_main_trie=st.just(
Trie[Address, Optional[Account]](secured=True, default=None, _data={})
),
_storage_tries=st.just({}),
_snapshots=st.just([]),
_snapshots=st.just(
[(Trie[Address, Optional[Account]](secured=True, default=None, _data={}), {})]
),
created_accounts=st.just(set()),
).map(
lambda state: State(
_main_trie=state._main_trie,
_storage_tries=state._storage_tries,
_snapshots=[
(
copy_trie(state._main_trie),
{addr: copy_trie(trie) for addr, trie in state._storage_tries.items()},
)
],
created_accounts=state.created_accounts,
)
)


Expand Down

0 comments on commit d151834

Please sign in to comment.