Skip to content

test_call_frame_context_ops()

Documentation for tests/benchmark/compute/instruction/test_tx_context.py::test_call_frame_context_ops@892e6d1e.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/benchmark/compute/instruction/test_tx_context.py::test_call_frame_context_ops --gas-benchmark-values 1

Benchmark call zero-parameter instructions.

Source code in tests/benchmark/compute/instruction/test_tx_context.py
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
@pytest.mark.repricing
@pytest.mark.parametrize(
    "opcode",
    [
        Op.ORIGIN,
        Op.GASPRICE,
    ],
)
def test_call_frame_context_ops(
    benchmark_test: BenchmarkTestFiller,
    opcode: Op,
) -> None:
    """Benchmark call zero-parameter instructions."""
    benchmark_test(
        target_opcode=opcode,
        code_generator=ExtCallGenerator(attack_block=opcode),
    )

Parametrized Test Cases

This test generates 2 parametrized test cases across 3 forks.