Skip to content

test_cover_revert()

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

Generate fixtures for these test cases for Cancun with:

Cancun only:

fill -v tests/frontier/opcodes/test_all_opcodes.py::test_cover_revert --fork=Cancun --evm-bin=/path/to/evm-tool-dev-version

For all forks up to and including Cancun:

fill -v tests/frontier/opcodes/test_all_opcodes.py::test_cover_revert --until=Cancun

Cover state revert from original tests for the coverage script

Source code in tests/frontier/opcodes/test_all_opcodes.py
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
@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,
        to=b"",
        value=0,
        protected=False,
    )

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