Skip to content

test_worst_unop()

Documentation for tests/benchmark/test_worst_compute.py::test_worst_unop@88e9fb8f.

Generate fixtures for these test cases for Osaka with:

fill -v tests/benchmark/test_worst_compute.py::test_worst_unop -m benchmark

Test running a block with as many unary instructions (takes one arg, produces one value) as possible.

Source code in tests/benchmark/test_worst_compute.py
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
@pytest.mark.parametrize("opcode", [Op.ISZERO, Op.NOT])
def test_worst_unop(
    benchmark_test: BenchmarkTestFiller,
    opcode: Op,
) -> None:
    """
    Test running a block with as many unary instructions (takes one arg,
    produces one value) as possible.
    """
    benchmark_test(
        code_generator=JumpLoopGenerator(setup=Op.PUSH0, attack_block=opcode),
    )

Parametrized Test Cases

This test case is only parametrized by fork.

Test ID (Abbreviated) opcode
...fork_Prague-blockchain_test-opcode_ISZERO ISZERO
...fork_Prague-blockchain_test-opcode_NOT NOT
...fork_Osaka-blockchain_test-opcode_ISZERO ISZERO
...fork_Osaka-blockchain_test-opcode_NOT NOT