Skip to content

test_delete_via_zero_value()

Documentation for tests/mpt/test_storage_trie_structure.py::test_delete_via_zero_value@02aafd78.

Generate fixtures for these test cases for Bogota with:

fill -v tests/mpt/test_storage_trie_structure.py::test_delete_via_zero_value --fork Bogota

Zero the only slot.

pre: leaf(64) post: empty

Source code in tests/mpt/test_storage_trie_structure.py
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
def test_delete_via_zero_value(
    state_test: StateTestFiller, pre: Alloc
) -> None:
    """
    Zero the only slot.

    pre:  leaf(64)
    post: empty
    """
    assert storage_shape([SINGLE_SLOT], SINGLE_SLOT) == [(0, "leaf", 64)]
    contract = pre.deploy_contract(
        code=_writer_code([(SINGLE_SLOT, 0)]), storage={SINGLE_SLOT: 1}
    )

    state_test(
        pre=pre,
        tx=Transaction(sender=pre.fund_eoa(), to=contract),
        post={contract: Account(storage={})},
    )

Parametrized Test Cases

This test generates 1 parametrized test case across 3 forks.