Skip to content

test_cover_revert()

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

Generate fixtures for these test cases for Amsterdam with:

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

Cover state revert from original tests for the coverage script.

Source code in tests/frontier/opcodes/test_all_opcodes.py
127
128
129
130
131
132
133
134
135
136
137
138
139
@pytest.mark.valid_from("Cancun")
def test_cover_revert(state_test: StateTestFiller, pre: Alloc) -> None:
    """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 generates 1 parametrized test case across 4 forks.