Skip to content

test_eofcreate_invalid_index()

Documentation for tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py::test_eofcreate_invalid_index@49a16fac.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py::test_eofcreate_invalid_index --fork Osaka

Referring to non-existent container section index.

Source code in tests/osaka/eip7692_eof_v1/eip7620_eof_create/test_eofcreate.py
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
@pytest.mark.parametrize("index", [1, 255], ids=lambda x: x)
def test_eofcreate_invalid_index(
    eof_test: EOFTestFiller,
    index: int,
):
    """Referring to non-existent container section index."""
    eof_test(
        container=Container(
            sections=[
                Section.Code(
                    code=Op.EOFCREATE[index](0, 0, 0, 0) + Op.STOP,
                ),
                Section.Container(container=Container(sections=[Section.Code(code=Op.INVALID)])),
            ],
        ),
        expect_exception=EOFException.INVALID_CONTAINER_SECTION_INDEX,
    )

Parametrized Test Cases

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

Test ID (Abbreviated) index
...fork_Osaka-eof_test-1 1
...fork_Osaka-eof_test-255 255