Skip to content

test_vectors_from_legacy_tests()

Documentation for tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py::test_vectors_from_legacy_tests@ffe48572.

Generate fixtures for these test cases for Bogota with:

fill -v tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py::test_vectors_from_legacy_tests --fork Bogota

Test ModExp gas cost using the test vectors from legacy tests.

Source code in tests/osaka/eip7883_modexp_gas_increase/test_modexp_thresholds.py
@pytest.mark.parametrize(
    "modexp_input,modexp_expected,gas_old,gas_new",
    vectors_from_file("legacy.json"),
    ids=lambda v: v.name,
)
@EIPChecklist.Precompile.Test.Inputs.Invalid()
@pytest.mark.valid_from("Berlin")
def test_vectors_from_legacy_tests(
    state_test: StateTestFiller,
    pre: Alloc,
    tx: Transaction,
    post: Dict,
) -> None:
    """Test ModExp gas cost using the test vectors from legacy tests."""
    state_test(
        pre=pre,
        tx=tx,
        post=post,
    )

Parametrized Test Cases

This test generates 32 parametrized test cases across 9 forks.