Skip to content

test_subcontainer_wrong_eof_version()

Documentation for tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_subcontainer_wrong_eof_version@83970623.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py::test_subcontainer_wrong_eof_version --fork Osaka

Test a subcontainer with the incorrect EOF version.

Source code in tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_subcontainer_validation.py
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
@pytest.mark.parametrize("version", [0, 255], ids=lambda x: x)
def test_subcontainer_wrong_eof_version(
    eof_test: EOFTestFiller,
    version: int,
):
    """Test a subcontainer with the incorrect EOF version."""
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.EOFCREATE[0](0, 0, 0, 0) + Op.STOP,
                ),
                Section.Container(
                    container=Container(version=[version], sections=[Section.Code(code=Op.STOP)])
                ),
            ],
            kind=ContainerKind.RUNTIME,
        ),
        expect_exception=EOFException.INVALID_VERSION,
    )

Parametrized Test Cases

The interactive table below is also available as a standalone page.

Test ID (Abbreviated) version
...fork_Osaka-eof_test-0 0
...fork_Osaka-eof_test-255 255