Skip to content

test_callf_to_nonreturning()

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

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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
@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