diff --git a/tests/common/test_versioned_state.py b/tests/common/test_versioned_state.py index 4a84a258a5..e1f31a8a92 100644 --- a/tests/common/test_versioned_state.py +++ b/tests/common/test_versioned_state.py @@ -10,34 +10,34 @@ def test_versioned_state() -> None: assert state["_state_version"] == 0 assert state["_state_engine_version"] == 1 - # first hash generation does not change version, attrs are not modified - version, hash, previous_hash = bump_state_version_if_modified(state) + # first hash_ generation does not change version, attrs are not modified + version, hash_, previous_hash = bump_state_version_if_modified(state) assert version == 0 - assert hash is not None + assert hash_ is not None assert previous_hash is None - assert state["_version_hash"] == hash + assert state["_version_hash"] == hash_ # change attr, but exclude while generating state["foo"] = "bar" # type: ignore - version, hash, previous_hash = bump_state_version_if_modified(state, exclude_attrs=["foo"]) + version, hash_, previous_hash = bump_state_version_if_modified(state, exclude_attrs=["foo"]) assert version == 0 - assert hash == previous_hash + assert hash_ == previous_hash - # now don't exclude (remember old hash to compare return vars) + # now don't exclude (remember old hash_ to compare return vars) old_hash = state["_version_hash"] - version, hash, previous_hash = bump_state_version_if_modified(state) + version, hash_, previous_hash = bump_state_version_if_modified(state) assert version == 1 - assert hash != previous_hash - assert old_hash != hash + assert hash_ != previous_hash + assert old_hash != hash_ assert previous_hash == old_hash - # messing with state engine version will not change hash + # messing with state engine version will not change hash_ state["_state_engine_version"] = 5 - version, hash, previous_hash = bump_state_version_if_modified(state) + version, hash_, previous_hash = bump_state_version_if_modified(state) assert version == 1 - assert hash == previous_hash + assert hash_ == previous_hash # make sure state object is not modified while bumping with no effect old_state = state.copy() - version, hash, previous_hash = bump_state_version_if_modified(state) + version, hash_, previous_hash = bump_state_version_if_modified(state) assert old_state == state