test_dupn()
Documentation for tests/benchmark/compute/instruction/test_stack.py::test_dupn@ffe48572.
Generate fixtures for these test cases for Bogota with:
fill -v tests/benchmark/compute/instruction/test_stack.py::test_dupn --gas-benchmark-values 1
Benchmark DUPN instruction.
Source code in tests/benchmark/compute/instruction/test_stack.py
| @pytest.mark.repricing
@pytest.mark.valid_from("Amsterdam")
@pytest.mark.parametrize(
"stack_index",
[17, 107, 235],
ids=lambda x: f"stack_{x}",
)
def test_dupn(
benchmark_test: BenchmarkTestFiller,
stack_index: int,
) -> None:
"""Benchmark DUPN instruction."""
opcode = Op.DUPN[stack_index]
benchmark_test(
target_opcode=Op.DUPN,
code_generator=ExtCallGenerator(
setup=Op.PUSH0 * opcode.min_stack_height,
attack_block=opcode,
),
)
|
Parametrized Test Cases
This test generates 3 parametrized test cases across 2 forks.