2019-05-05 22:31:57 +00:00
|
|
|
|
|
|
|
from eth2spec.phase0 import spec
|
|
|
|
from tests.utils import with_args
|
|
|
|
|
|
|
|
from .helpers import (
|
|
|
|
create_genesis_state,
|
|
|
|
)
|
|
|
|
|
2019-05-06 15:10:43 +00:00
|
|
|
from tests.utils import spectest
|
|
|
|
|
2019-05-05 22:31:57 +00:00
|
|
|
# Provides a genesis state as first argument to the function decorated with this
|
|
|
|
with_state = with_args(lambda: [create_genesis_state(spec.SLOTS_PER_EPOCH * 8, list())])
|
2019-05-06 15:10:43 +00:00
|
|
|
|
|
|
|
|
|
|
|
# shorthand for decorating @with_state @spectest()
|
|
|
|
def spec_state_test(fn):
|
|
|
|
return with_state(spectest()(fn))
|