Skip to content

test_mcopy_on_empty_memory()

Documentation for tests/cancun/eip5656_mcopy/test_mcopy.py::test_mcopy_on_empty_memory@21507778.

Generate fixtures for these test cases for Amsterdam with:

fill -v tests/cancun/eip5656_mcopy/test_mcopy.py::test_mcopy_on_empty_memory --fork Amsterdam

Perform MCOPY operations on an empty memory, using different offsets and lengths.

Source code in tests/cancun/eip5656_mcopy/test_mcopy.py
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
@pytest.mark.parametrize("dest", [0x00, 0x20])
@pytest.mark.parametrize("src", [0x00, 0x20])
@pytest.mark.parametrize("length", [0x00, 0x01])
@pytest.mark.parametrize("initial_memory", [bytes()], ids=["empty_memory"])
@pytest.mark.valid_from("Cancun")
def test_mcopy_on_empty_memory(
    state_test: StateTestFiller,
    pre: Alloc,
    post: Mapping[str, Account],
    tx: Transaction,
) -> None:
    """
    Perform MCOPY operations on an empty memory, using different offsets and
    lengths.
    """
    state_test(
        env=Environment(),
        pre=pre,
        post=post,
        tx=tx,
    )

Parametrized Test Cases

This test generates 8 parametrized test cases across 4 forks.