Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Run Deneb on_block tests in Electra but not 7594 #3883

Merged
merged 1 commit into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/core/pyspec/eth2spec/test/context.py
Original file line number Diff line number Diff line change
Expand Up @@ -429,6 +429,13 @@ def decorator(fn):
return decorator


def with_all_phases_from_except(earliest_phase, except_phases=None):
"""
A decorator factory for running a tests with every phase except the ones listed
"""
return with_all_phases_from(earliest_phase, [phase for phase in ALL_PHASES if phase not in except_phases])


def with_all_phases_except(exclusion_phases):
"""
A decorator factory for running a tests with every phase except the ones listed
Expand Down
17 changes: 10 additions & 7 deletions tests/core/pyspec/eth2spec/test/deneb/fork_choice/test_on_block.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,13 @@

from eth2spec.test.context import (
spec_state_test,
with_phases,
with_all_phases_from_except,
)

from eth2spec.test.helpers.constants import DENEB
from eth2spec.test.helpers.constants import (
DENEB,
EIP7594,
)

from eth2spec.test.helpers.block import (
build_empty_block_for_next_slot,
Expand Down Expand Up @@ -36,7 +39,7 @@ def get_block_with_blob(spec, state, rng=None):
return block, blobs, blob_kzg_proofs


@with_phases([DENEB])
@with_all_phases_from_except(DENEB, [EIP7594])
@spec_state_test
def test_simple_blob_data(spec, state):
rng = Random(1234)
Expand Down Expand Up @@ -71,7 +74,7 @@ def test_simple_blob_data(spec, state):
yield 'steps', test_steps


@with_phases([DENEB])
@with_all_phases_from_except(DENEB, [EIP7594])
@spec_state_test
def test_invalid_incorrect_proof(spec, state):
rng = Random(1234)
Expand Down Expand Up @@ -99,7 +102,7 @@ def test_invalid_incorrect_proof(spec, state):
yield 'steps', test_steps


@with_phases([DENEB])
@with_all_phases_from_except(DENEB, [EIP7594])
@spec_state_test
def test_invalid_data_unavailable(spec, state):
rng = Random(1234)
Expand Down Expand Up @@ -127,7 +130,7 @@ def test_invalid_data_unavailable(spec, state):
yield 'steps', test_steps


@with_phases([DENEB])
@with_all_phases_from_except(DENEB, [EIP7594])
@spec_state_test
def test_invalid_wrong_proofs_length(spec, state):
rng = Random(1234)
Expand Down Expand Up @@ -155,7 +158,7 @@ def test_invalid_wrong_proofs_length(spec, state):
yield 'steps', test_steps


@with_phases([DENEB])
@with_all_phases_from_except(DENEB, [EIP7594])
@spec_state_test
def test_invalid_wrong_blobs_length(spec, state):
rng = Random(1234)
Expand Down
Loading