Skip to content

test_callf_to_nonreturning()

Documentation for tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py::test_callf_to_nonreturning@01f496f4.

Generate fixtures for these test cases for Osaka with:

fill -v tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py::test_callf_to_nonreturning --fork Osaka

Test EOF validation failing due to CALLF to non-returning section.

Source code in tests/osaka/eip7692_eof_v1/eip6206_jumpf/test_nonreturning_validation.py
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
@pytest.mark.parametrize(
    "container",
    [
        Container(
            name="0_to_1",
            sections=[
                Section.Code(
                    Op.CALLF[1],
                ),
                Section.Code(
                    Op.STOP,
                ),
            ],
        ),
        Container(
            name="self_0",
            sections=[
                Section.Code(
                    Op.CALLF[0] + Op.STOP,
                )
            ],
        ),
        Container(
            name="self_1",
            sections=[
                Section.Code(
                    Op.JUMPF[1],
                ),
                Section.Code(
                    Op.CALLF[1] + Op.STOP,
                ),
            ],
        ),
        Container(
            name="1_to_0",
            sections=[
                Section.Code(
                    Op.CALLF[1] + Op.STOP,
                ),
                Section.Code(
                    Op.CALLF[0] + Op.RETF,
                    code_outputs=0,
                ),
            ],
        ),
        Container(
            name="1_to_2",
            sections=[
                Section.Code(
                    Op.CALLF[1] + Op.STOP,
                ),
                Section.Code(
                    Op.CALLF[2] + Op.RETF,
                    code_outputs=0,
                ),
                Section.Code(
                    Op.INVALID,
                ),
            ],
        ),
    ],
    ids=lambda x: x.name,
)
def test_callf_to_nonreturning(eof_test: EOFTestFiller, container: Container):
    """Test EOF validation failing due to CALLF to non-returning section."""
    eof_test(container=container, expect_exception=EOFException.CALLF_TO_NON_RETURNING)

Parametrized Test Cases

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

Test ID (Abbreviated) container
...fork_Osaka-eof_test-0_to_1 0_to_1
...fork_Osaka-eof_test-self_0 self_0
...fork_Osaka-eof_test-self_1 self_1
...fork_Osaka-eof_test-1_to_0 1_to_0
...fork_Osaka-eof_test-1_to_2 1_to_2
...fork_Osaka-state_test_from_eof_test-0_to_1 0_to_1
...fork_Osaka-state_test_from_eof_test-self_0 self_0
...fork_Osaka-state_test_from_eof_test-self_1 self_1
...fork_Osaka-state_test_from_eof_test-1_to_0 1_to_0
...fork_Osaka-state_test_from_eof_test-1_to_2 1_to_2
...fork_Osaka-blockchain_test_from_eof_test-0_to_1 0_to_1
...fork_Osaka-blockchain_test_from_eof_test-self_0 self_0
...fork_Osaka-blockchain_test_from_eof_test-self_1 self_1
...fork_Osaka-blockchain_test_from_eof_test-1_to_0 1_to_0
...fork_Osaka-blockchain_test_from_eof_test-1_to_2 1_to_2