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

Function test_storage_nested_structures

core/tests/python/tests/test_storage.py:167–181  ·  view source on GitHub ↗

Nested data structures should be stored and retrieved correctly.

()

Source from the content-addressed store, hash-verified

165
166
167async def test_storage_nested_structures():
168 """
169 Nested data structures should be stored and retrieved correctly.
170 """
171 nested = {
172 "level1": {"level2": {"level3": [1, 2, 3]}},
173 "list_of_dicts": [{"a": 1}, {"b": 2}, {"c": 3}],
174 }
175
176 test_store["nested"] = nested
177 await test_store.sync()
178
179 retrieved = test_store["nested"]
180 assert retrieved["level1"]["level2"]["level3"] == [1, 2, 3]
181 assert retrieved["list_of_dicts"][0]["a"] == 1
182
183
184async def test_storage_overwrite():

Callers

nothing calls this directly

Calls 1

syncMethod · 0.80

Tested by

no test coverage detected