MCPcopy
hub / github.com/langroid/langroid / test_object_lookup

Function test_object_lookup

tests/main/test_object_registry.py:65–70  ·  view source on GitHub ↗

Test if objects can be retrieved correctly using their IDs.

(create_objects)

Source from the content-addressed store, hash-verified

63
64
65def test_object_lookup(create_objects):
66 """Test if objects can be retrieved correctly using their IDs."""
67 a1, a2, b1 = create_objects
68 assert ObjectRegistry.get(a1.id) is a1, "Lookup for A1 should return A1"
69 assert ObjectRegistry.get(a2.id) is a2, "Lookup for A2 should return A2"
70 assert ObjectRegistry.get(b1.id) is b1, "Lookup for B1 should return B1"
71
72
73def test_a_to_a_links(create_objects):

Callers

nothing calls this directly

Calls 1

getMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…