Skip to content

Commit 9c3075b

Browse files
committed
Add missing STF test post checks + confirm state validation works
1 parent 628f927 commit 9c3075b

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/spec_tests/devnet/state_transition/test_blocks.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
"""Single block processing tests for the devnet fork."""
22

33
import pytest
4-
from lean_spec_tests import BlockBuilder, StateTransitionTestFiller
4+
from lean_spec_tests import BlockBuilder, StateExpectation, StateTransitionTestFiller
55

66
from lean_spec.subspecs.containers.slot import Slot
77
from lean_spec.subspecs.containers.state import State
@@ -30,6 +30,9 @@ def test_single_empty_block(state_transition_test: StateTransitionTestFiller) ->
3030
state_transition_test(
3131
pre=genesis,
3232
blocks=[block],
33+
post=StateExpectation(
34+
slot=Slot(1),
35+
),
3336
)
3437

3538

@@ -48,6 +51,9 @@ def test_single_block_with_slot_gap(state_transition_test: StateTransitionTestFi
4851
state_transition_test(
4952
pre=genesis,
5053
blocks=[block],
54+
post=StateExpectation(
55+
slot=Slot(5),
56+
),
5157
)
5258

5359

@@ -73,4 +79,8 @@ def test_sequential_blocks(state_transition_test: StateTransitionTestFiller) ->
7379
state_transition_test(
7480
pre=genesis,
7581
blocks=[block1, block2, block3],
82+
post=StateExpectation(
83+
slot=Slot(3),
84+
validator_count=4,
85+
),
7686
)

0 commit comments

Comments
 (0)