MCPcopy Create free account
hub / github.com/RedisGraph/RedisGraph / test_zero_length_path

Method test_zero_length_path

tests/flow/test_path.py:152–170  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

150 self._assert_resultset_and_expected_mutually_included(redis_graph.query(query), query_info)
151
152 def test_zero_length_path(self):
153 node0 = Node(node_id=0, label="L1")
154 node1 = Node(node_id=1, label="L2")
155 edge01 = Edge(node0, "R1", node1, edge_id=0, properties={'value': 1})
156
157 redis_graph.add_node(node0)
158 redis_graph.add_node(node1)
159 redis_graph.add_edge(edge01)
160
161 redis_graph.flush()
162
163 path01 = Path.new_empty_path().add_node(node0).add_edge(edge01).add_node(node1)
164 expected_results=[[path01]]
165
166 query = "MATCH p=(:L1)-[*0..]->()-[]->(:L2) RETURN p"
167
168 query_info = QueryInfo(query = query, description="Tests path with zero length variable length paths", \
169 expected_result = expected_results)
170 self._assert_resultset_and_expected_mutually_included(redis_graph.query(query), query_info)
171
172 def test_path_comparison(self):
173 node0 = Node(node_id=0, label="L1")

Callers

nothing calls this directly

Calls 5

QueryInfoClass · 0.90
NodeClass · 0.50
EdgeClass · 0.50
queryMethod · 0.45

Tested by

no test coverage detected