eth2.0-specs/tests/core/pyspec/eth2spec/config
Hsiao-Wei Wang 6289664260
Update testing context
1. Add `with_configs` decorator to assign available configs
2. Add `only_full_crosslink` decorator to detect if the configuation can
do full crosslinking
3. Add `context.is_pytest` flag: True if calling via pytest. False if
calling from test generator.
2020-08-12 21:50:14 +08:00
..
README.md [Minor] Fix config example to not assign a return value. 2020-05-08 20:12:44 +10:00
__init__.py merge in dev (v0.10) and fix reorg/lint issues 2020-01-13 18:55:21 +01:00
config_util.py Update testing context 2020-08-12 21:50:14 +08:00

README.md

Eth2 config util

For configuration, see Configs documentation.

Usage:

configs_path = 'configs/'

...

from eth2spec.config import config_util
from eth2spec.phase0 import spec
from importlib import reload
config_util.prepare_config(configs_path, 'mainnet')
# reload spec to make loaded config effective
reload(spec)

WARNING: this overwrites globals, make sure to prevent accidental collisions with other usage of the same imported specs package.