diff --git a/tests/core/pyspec/eth2spec/test/altair/unittests/test_config_override.py b/tests/core/pyspec/eth2spec/test/altair/unittests/test_config_override.py index 5c940eafc..b7df49790 100644 --- a/tests/core/pyspec/eth2spec/test/altair/unittests/test_config_override.py +++ b/tests/core/pyspec/eth2spec/test/altair/unittests/test_config_override.py @@ -1,8 +1,10 @@ from eth2spec.test.context import ( + is_post_capella, + is_post_eip4844, spec_configured_state_test, spec_state_test_with_matching_config, with_all_phases, - with_phases + with_phases, ) from eth2spec.test.helpers.constants import ALTAIR @@ -38,9 +40,15 @@ def test_override_config_fork_epoch(spec, state): if state.fork.current_version == spec.config.BELLATRIX_FORK_VERSION: return - assert spec.config.CAPELLA_FORK_EPOCH == spec.GENESIS_EPOCH - if state.fork.current_version == spec.config.CAPELLA_FORK_VERSION: - return + if is_post_capella(spec): + assert spec.config.CAPELLA_FORK_EPOCH == spec.GENESIS_EPOCH + if state.fork.current_version == spec.config.CAPELLA_FORK_VERSION: + return + + if is_post_eip4844(spec): + assert spec.config.EIP4844_FORK_EPOCH == spec.GENESIS_EPOCH + if state.fork.current_version == spec.config.EIP4844_FORK_VERSION: + return assert spec.config.SHARDING_FORK_EPOCH == spec.GENESIS_EPOCH if state.fork.current_version == spec.config.SHARDING_FORK_VERSION: diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 0f62612e7..e46e41a70 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -596,6 +596,10 @@ def is_post_capella(spec): return spec.fork == CAPELLA +def is_post_eip4844(spec): + return spec.fork == EIP4844 + + with_altair_and_later = with_all_phases_except([PHASE0]) with_bellatrix_and_later = with_all_phases_except([PHASE0, ALTAIR]) with_capella_and_later = with_all_phases_except([PHASE0, ALTAIR, BELLATRIX, EIP4844])