Skip to content

test_cover_revert()

Documentation for tests/frontier/opcodes/test_all_opcodes.py::test_cover_revert@16d4f3bd.

Generate fixtures for these test cases for Prague with:

fill -v tests/frontier/opcodes/test_all_opcodes.py::test_cover_revert --fork Prague

Cover state revert from original tests for the coverage script.

Source code in tests/frontier/opcodes/test_all_opcodes.py
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
@pytest.mark.valid_from("Cancun")
def test_cover_revert(state_test: StateTestFiller, pre: Alloc):
    """Cover state revert from original tests for the coverage script."""
    tx = Transaction(
        sender=pre.fund_eoa(),
        gas_limit=1_000_000,
        data=Op.SSTORE(1, 1) + Op.REVERT(0, 0),
        to=None,
        value=0,
        protected=False,
    )

    state_test(env=Environment(), pre=pre, post={}, tx=tx)

Parametrized Test Cases

This test case is only parametrized by fork and fixture format.

Test ID (Abbreviated)
...fork_Cancun-blockchain_test
...fork_Cancun-state_test
...fork_Prague-blockchain_test
...fork_Prague-state_test
...fork_Osaka-blockchain_test
...fork_Osaka-state_test