Add skipping messages to some old test cases
This commit is contained in:
parent
458166af83
commit
b4583aba5d
|
@ -22,7 +22,7 @@ from eth2spec.test.helpers.shard_transitions import get_shard_transition_of_comm
|
|||
|
||||
from eth2spec.test.context import (
|
||||
PHASE0, PHASE1,
|
||||
spec_state_test, with_all_phases, expect_assertion_error, always_bls, with_phases,
|
||||
spec_state_test, with_all_phases, expect_assertion_error, always_bls, with_phases, dump_skipping_message,
|
||||
)
|
||||
|
||||
|
||||
|
@ -291,10 +291,9 @@ def test_empty_epoch_transition(spec, state):
|
|||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_empty_epoch_transition_not_finalizing(spec, state):
|
||||
# Don't run for non-minimal configs, it takes very long, and the effect
|
||||
# of calling finalization/justification is just the same as with the minimal configuration.
|
||||
if spec.SLOTS_PER_EPOCH > 8:
|
||||
return
|
||||
return dump_skipping_message("Skip mainnet config for saving time."
|
||||
" Minimal config suffice to cover the target-of-test.")
|
||||
|
||||
# copy for later balance lookups.
|
||||
pre_balances = list(state.balances)
|
||||
|
@ -480,9 +479,8 @@ def test_attester_slashing(spec, state):
|
|||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_duplicate_attester_slashing(spec, state):
|
||||
# Skip test if config cannot handle multiple AttesterSlashings per block
|
||||
if spec.MAX_ATTESTER_SLASHINGS < 2:
|
||||
return
|
||||
return dump_skipping_message("Skip test if config cannot handle multiple AttesterSlashings per block")
|
||||
|
||||
attester_slashing = get_valid_attester_slashing(spec, state, signed_1=True, signed_2=True)
|
||||
attester_slashings = [attester_slashing, attester_slashing.copy()]
|
||||
|
@ -509,9 +507,8 @@ def test_duplicate_attester_slashing(spec, state):
|
|||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_multiple_attester_slashings_no_overlap(spec, state):
|
||||
# Skip test if config cannot handle multiple AttesterSlashings per block
|
||||
if spec.MAX_ATTESTER_SLASHINGS < 2:
|
||||
return
|
||||
return dump_skipping_message("Skip test if config cannot handle multiple AttesterSlashings per block")
|
||||
|
||||
# copy for later balance lookups.
|
||||
pre_state = state.copy()
|
||||
|
@ -550,9 +547,8 @@ def test_multiple_attester_slashings_no_overlap(spec, state):
|
|||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_multiple_attester_slashings_partial_overlap(spec, state):
|
||||
# Skip test if config cannot handle multiple AttesterSlashings per block
|
||||
if spec.MAX_ATTESTER_SLASHINGS < 2:
|
||||
return
|
||||
return dump_skipping_message("Skip test if config cannot handle multiple AttesterSlashings per block")
|
||||
|
||||
# copy for later balance lookups.
|
||||
pre_state = state.copy()
|
||||
|
@ -888,9 +884,9 @@ def test_historical_batch(spec, state):
|
|||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_eth1_data_votes_consensus(spec, state):
|
||||
# Don't run when it will take very, very long to simulate. Minimal configuration suffices.
|
||||
if spec.EPOCHS_PER_ETH1_VOTING_PERIOD > 2:
|
||||
return
|
||||
return dump_skipping_message("Skip test if config with longer `EPOCHS_PER_ETH1_VOTING_PERIOD` for saving time."
|
||||
" Minimal config suffice to cover the target-of-test.")
|
||||
|
||||
voting_period_slots = spec.EPOCHS_PER_ETH1_VOTING_PERIOD * spec.SLOTS_PER_EPOCH
|
||||
|
||||
|
@ -932,9 +928,9 @@ def test_eth1_data_votes_consensus(spec, state):
|
|||
@with_all_phases
|
||||
@spec_state_test
|
||||
def test_eth1_data_votes_no_consensus(spec, state):
|
||||
# Don't run when it will take very, very long to simulate. Minimal configuration suffices.
|
||||
if spec.EPOCHS_PER_ETH1_VOTING_PERIOD > 2:
|
||||
return
|
||||
return dump_skipping_message("Skip test if config with longer `EPOCHS_PER_ETH1_VOTING_PERIOD` for saving time."
|
||||
" Minimal config suffice to cover the target-of-test.")
|
||||
|
||||
voting_period_slots = spec.EPOCHS_PER_ETH1_VOTING_PERIOD * spec.SLOTS_PER_EPOCH
|
||||
|
||||
|
|
Loading…
Reference in New Issue