2019-03-18 10:18:57 -06:00
|
|
|
import pytest
|
2019-03-18 12:51:52 -06:00
|
|
|
|
2019-04-03 14:18:17 +11:00
|
|
|
from eth2spec.phase0 import spec
|
2019-04-22 17:46:13 +10:00
|
|
|
from preset_loader import loader
|
2019-03-18 10:18:57 -06:00
|
|
|
|
2019-03-18 12:51:52 -06:00
|
|
|
|
2019-04-22 17:46:13 +10:00
|
|
|
def pytest_addoption(parser):
|
|
|
|
parser.addoption(
|
|
|
|
"--config", action="store", default="minimal", help="config: make the pyspec use the specified configuration"
|
|
|
|
)
|
2019-03-18 12:51:52 -06:00
|
|
|
|
|
|
|
|
|
|
|
@pytest.fixture(autouse=True)
|
2019-04-22 17:46:13 +10:00
|
|
|
def config(request):
|
|
|
|
config_name = request.config.getoption("--config")
|
|
|
|
presets = loader.load_presets('../../configs/', config_name)
|
|
|
|
spec.apply_constants_preset(presets)
|