Skip to content

test_returncode_terminating()

Documentation for tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_returncode.py::test_returncode_terminating@14a7429a.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_returncode.py::test_returncode_terminating --fork Osaka

Unreachable code after RETURNCODE.

Source code in tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_returncode.py
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
def test_returncode_terminating(
    eof_test: EOFTestFiller,
):
    """Unreachable code after RETURNCODE."""
    eof_test(
        container_kind=ContainerKind.INITCODE,
        container=Container(
            sections=[
                Section.Code(
                    code=Op.RETURNCODE[0](0, 0) + Op.REVERT(0, 0),
                ),
                Section.Container(container=Container(sections=[Section.Code(code=Op.INVALID)])),
            ],
        ),
        expect_exception=EOFException.UNREACHABLE_INSTRUCTIONS,
    )

Parametrized Test Cases

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

Test ID (Abbreviated)
...fork_Osaka-eof_test
...fork_Osaka-state_test_from_eof_test
...fork_Osaka-blockchain_test_from_eof_test