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

Function test_storage_get_method

core/tests/python/tests/test_storage.py:97–105  ·  view source on GitHub ↗

The get method should return default value for missing keys.

()

Source from the content-addressed store, hash-verified

95
96
97async def test_storage_get_method():
98 """
99 The get method should return default value for missing keys.
100 """
101 test_store["exists"] = "value"
102
103 assert test_store.get("exists") == "value"
104 assert test_store.get("missing") is None
105 assert test_store.get("missing", "default") == "default"
106
107
108async def test_storage_keys_values_items():

Callers

nothing calls this directly

Calls 1

getMethod · 0.45

Tested by

no test coverage detected