(entity, props)
| 226 | |
| 227 | |
| 228 | def 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 | |
| 239 | def assert_has_metadata(entity, props): |