MCPcopy Index your code
hub / github.com/pyscript/pyscript / test_storage_clear

Function test_storage_clear

core/tests/python/tests/test_storage.py:86–94  ·  view source on GitHub ↗

The clear method should remove all items from the storage object.

()

Source from the content-addressed store, hash-verified

84
85
86async def test_storage_clear():
87 """
88 The clear method should remove all items from the storage object.
89 """
90 test_store["a"] = 1
91 test_store["b"] = 2
92 assert len(test_store) == 2
93 test_store.clear()
94 assert len(test_store) == 0
95
96
97async def test_storage_get_method():

Callers

nothing calls this directly

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected