From 3e2d9a755acdf4caef1acc29540809a0bbf49a24 Mon Sep 17 00:00:00 2001 From: djrtwo Date: Mon, 15 May 2023 11:57:13 -0600 Subject: [PATCH] disable some attestation tests for attslotrange --- .gitignore | 1 + tests/core/pyspec/eth2spec/test/context.py | 2 ++ .../block_processing/test_process_attestation.py | 15 +++++++++------ 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/.gitignore b/.gitignore index b64dbde43..c8cd7a15a 100644 --- a/.gitignore +++ b/.gitignore @@ -4,6 +4,7 @@ venv .venvs .venv /.pytest_cache +*.swp build/ output/ diff --git a/tests/core/pyspec/eth2spec/test/context.py b/tests/core/pyspec/eth2spec/test/context.py index 4ffae34af..37a6e6eab 100644 --- a/tests/core/pyspec/eth2spec/test/context.py +++ b/tests/core/pyspec/eth2spec/test/context.py @@ -438,6 +438,8 @@ with_deneb_and_later = with_all_phases_from(DENEB) with_eip6110_and_later = with_all_phases_from(EIP6110) with_attslotrange_and_later = with_all_phases_from(ATTSLOTRANGE) +with_all_phases_except_attslotrange = with_all_phases_except(ATTSLOTRANGE) + def _get_preset_targets(kw): preset_name = DEFAULT_TEST_PRESET diff --git a/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py b/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py index 7595ce9cb..938d874ed 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py +++ b/tests/core/pyspec/eth2spec/test/phase0/block_processing/test_process_attestation.py @@ -2,6 +2,9 @@ from eth2spec.test.context import ( spec_state_test, always_bls, never_bls, with_all_phases, + # Note, if attslotrange gets included, this will need to be + # 'with all phases up until attslotrange' + with_all_phases_except_attslotrange, spec_test, low_balances, with_custom_state, @@ -93,7 +96,7 @@ def test_invalid_before_inclusion_delay(spec, state): yield from run_attestation_processing(spec, state, attestation, valid=False) -@with_all_phases +@with_all_phases_except_attslotrange @spec_state_test def test_invalid_after_epoch_slots(spec, state): attestation = get_valid_attestation(spec, state, signed=True) @@ -391,7 +394,7 @@ def test_correct_attestation_included_at_one_epoch_delay(spec, state): yield from run_attestation_processing(spec, state, attestation) -@with_all_phases +@with_all_phases_except_attslotrange @spec_state_test def test_invalid_correct_attestation_included_after_epoch_delay(spec, state): attestation = get_valid_attestation(spec, state, signed=True) @@ -430,7 +433,7 @@ def test_incorrect_head_included_at_sqrt_epoch_delay(spec, state): yield from run_attestation_processing(spec, state, attestation) -@with_all_phases +@with_all_phases_except_attslotrange @spec_state_test def test_incorrect_head_included_at_epoch_delay(spec, state): attestation = get_valid_attestation(spec, state, signed=False) @@ -442,7 +445,7 @@ def test_incorrect_head_included_at_epoch_delay(spec, state): yield from run_attestation_processing(spec, state, attestation) -@with_all_phases +@with_all_phases_except_attslotrange @spec_state_test def test_invalid_incorrect_head_included_after_epoch_delay(spec, state): attestation = get_valid_attestation(spec, state, signed=False) @@ -499,7 +502,7 @@ def test_incorrect_head_and_target_included_at_epoch_delay(spec, state): yield from run_attestation_processing(spec, state, attestation) -@with_all_phases +@with_all_phases_except_attslotrange @spec_state_test def test_invalid_incorrect_head_and_target_included_after_epoch_delay(spec, state): attestation = get_valid_attestation(spec, state, signed=False) @@ -553,7 +556,7 @@ def test_incorrect_target_included_at_epoch_delay(spec, state): yield from run_attestation_processing(spec, state, attestation) -@with_all_phases +@with_all_phases_except_attslotrange @spec_state_test def test_invalid_incorrect_target_included_after_epoch_delay(spec, state): attestation = get_valid_attestation(spec, state, signed=False)