Make transition tests comply to sanity format

This commit is contained in:
Mikhail Kalinin 2023-04-07 14:20:28 +06:00
parent d78c7ada03
commit c2473e7b8a
1 changed files with 3 additions and 1 deletions

View File

@ -1,5 +1,6 @@
from eth2spec.test.helpers.block import ( from eth2spec.test.helpers.block import (
build_empty_block_for_next_slot, build_empty_block_for_next_slot,
sign_block,
) )
from eth2spec.test.context import ( from eth2spec.test.context import (
spec_state_test, spec_state_test,
@ -27,7 +28,8 @@ def run_deposit_transition_block(spec, state, block, top_up_keys=[], valid=True)
If ``valid == False``, run expecting ``AssertionError`` If ``valid == False``, run expecting ``AssertionError``
""" """
yield 'pre', state yield 'pre', state
yield 'block', block signed_block = sign_block(spec, state, block, proposer_index=block.proposer_index)
yield 'blocks', [signed_block]
if not valid: if not valid:
expect_assertion_error(lambda: spec.process_block(state, block)) expect_assertion_error(lambda: spec.process_block(state, block))