Skip mainnet genesis tests

This commit is contained in:
Hsiao-Wei Wang 2021-03-16 00:46:57 +08:00
parent 5d9f4b072c
commit 734863a6d6
No known key found for this signature in database
GPG Key ID: 1111A8A81778319E
2 changed files with 26 additions and 2 deletions

View File

@ -1,4 +1,11 @@
from eth2spec.test.context import PHASE0, ALTAIR, spec_test, with_phases, single_phase, is_post_altair
from eth2spec.test.context import (
PHASE0, ALTAIR, MINIMAL,
is_post_altair,
single_phase,
spec_test,
with_configs,
with_phases,
)
from eth2spec.test.helpers.deposits import (
prepare_full_genesis_deposits,
prepare_random_genesis_deposits,
@ -12,6 +19,7 @@ def get_post_altair_description(spec):
@with_phases(([PHASE0, ALTAIR]))
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_initialize_beacon_state_from_eth1(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -48,6 +56,7 @@ def test_initialize_beacon_state_from_eth1(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_initialize_beacon_state_some_small_balances(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -92,6 +101,7 @@ def test_initialize_beacon_state_some_small_balances(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_initialize_beacon_state_one_topup_activation(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -141,6 +151,7 @@ def test_initialize_beacon_state_one_topup_activation(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_initialize_beacon_state_random_invalid_genesis(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -168,6 +179,7 @@ def test_initialize_beacon_state_random_invalid_genesis(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_initialize_beacon_state_random_valid_genesis(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)

View File

@ -1,4 +1,11 @@
from eth2spec.test.context import PHASE0, ALTAIR, spec_test, with_phases, single_phase, is_post_altair
from eth2spec.test.context import (
PHASE0, ALTAIR, MINIMAL,
is_post_altair,
spec_test,
single_phase,
with_configs,
with_phases,
)
from eth2spec.test.helpers.deposits import (
prepare_full_genesis_deposits,
)
@ -37,6 +44,7 @@ def run_is_valid_genesis_state(spec, state, valid=True):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_is_valid_genesis_state_true(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -49,6 +57,7 @@ def test_is_valid_genesis_state_true(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_is_valid_genesis_state_false_invalid_timestamp(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -62,6 +71,7 @@ def test_is_valid_genesis_state_false_invalid_timestamp(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_is_valid_genesis_state_true_more_balance(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -75,6 +85,7 @@ def test_is_valid_genesis_state_true_more_balance(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_is_valid_genesis_state_true_one_more_validator(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)
@ -97,6 +108,7 @@ def test_is_valid_genesis_state_true_one_more_validator(spec):
@with_phases([PHASE0, ALTAIR])
@spec_test
@single_phase
@with_configs([MINIMAL], reason="too slow")
def test_is_valid_genesis_state_false_not_enough_validator(spec):
if is_post_altair(spec):
yield 'description', 'meta', get_post_altair_description(spec)