Skip to content

test_mcopy_on_empty_memory()

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

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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
@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(pre=pre, post=post, tx=tx)

Parametrized Test Cases

This test generates 8 parametrized test cases across 4 forks.