From 17d65ca6b40d454393eec1e9f49d0bda54072c34 Mon Sep 17 00:00:00 2001 From: Mikhail Kalinin Date: Wed, 20 Mar 2024 15:05:59 +0600 Subject: [PATCH] Create eip7251 config invariants test --- .../eth2spec/test/eip7251/unittests/__init__.py | 0 .../test/eip7251/unittests/test_config_invariants.py | 12 ++++++++++++ .../test/phase0/unittests/test_config_invariants.py | 7 ------- 3 files changed, 12 insertions(+), 7 deletions(-) create mode 100644 tests/core/pyspec/eth2spec/test/eip7251/unittests/__init__.py create mode 100644 tests/core/pyspec/eth2spec/test/eip7251/unittests/test_config_invariants.py diff --git a/tests/core/pyspec/eth2spec/test/eip7251/unittests/__init__.py b/tests/core/pyspec/eth2spec/test/eip7251/unittests/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/tests/core/pyspec/eth2spec/test/eip7251/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/eip7251/unittests/test_config_invariants.py new file mode 100644 index 000000000..7acad99ef --- /dev/null +++ b/tests/core/pyspec/eth2spec/test/eip7251/unittests/test_config_invariants.py @@ -0,0 +1,12 @@ +from eth2spec.test.context import ( + single_phase, + spec_test, + with_eip7251_and_later, +) + + +@with_eip7251_and_later +@spec_test +@single_phase +def test_withdrawals(spec): + assert spec.MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD < spec.MAX_WITHDRAWALS_PER_PAYLOAD diff --git a/tests/core/pyspec/eth2spec/test/phase0/unittests/test_config_invariants.py b/tests/core/pyspec/eth2spec/test/phase0/unittests/test_config_invariants.py index 078398962..c58f817f7 100644 --- a/tests/core/pyspec/eth2spec/test/phase0/unittests/test_config_invariants.py +++ b/tests/core/pyspec/eth2spec/test/phase0/unittests/test_config_invariants.py @@ -1,7 +1,6 @@ from eth2spec.test.context import ( spec_state_test, with_all_phases, - with_eip7251_and_later, ) from eth2spec.test.helpers.constants import UINT64_MAX from eth2spec.test.helpers.forks import ( @@ -92,9 +91,3 @@ def test_networking(spec, state): def test_fork_choice(spec, state): assert spec.INTERVALS_PER_SLOT < spec.config.SECONDS_PER_SLOT assert spec.config.PROPOSER_SCORE_BOOST <= 100 - - -@with_eip7251_and_later -@spec_state_test -def test_withdrawals(spec, state): - assert spec.MAX_PARTIAL_WITHDRAWALS_PER_PAYLOAD < spec.MAX_WITHDRAWALS_PER_PAYLOAD