MCPcopy Create free account
hub / github.com/Pometry/Raphtory / assert_has_properties

Function assert_has_properties

python/test_utils/utils.py:228–236  ·  view source on GitHub ↗
(entity, props)

Source from the content-addressed store, hash-verified

226
227
228def assert_has_properties(entity, props):
229 for k, v in props.items():
230 actual = entity.properties.get(k)
231 # Convert PyArrow arrays and other array-like objects to lists for comparison
232 if hasattr(actual, "to_pylist"):
233 actual = actual.to_pylist()
234 elif hasattr(actual, "tolist"):
235 actual = actual.tolist()
236 assert actual == v
237
238
239def assert_has_metadata(entity, props):

Callers 5

test_add_updatesFunction · 0.90
test_add_updatesFunction · 0.90
test_add_propertiesFunction · 0.90
test_add_nodeFunction · 0.90
test_add_edgeFunction · 0.90

Calls 2

itemsMethod · 0.45
getMethod · 0.45

Tested by 5

test_add_updatesFunction · 0.72
test_add_updatesFunction · 0.72
test_add_propertiesFunction · 0.72
test_add_nodeFunction · 0.72
test_add_edgeFunction · 0.72