Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 031786c

Browse files
committedJan 11, 2022
add test
1 parent 91d6122 commit 031786c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
 

‎tests/functional/test_all.py

+19
Original file line numberDiff line numberDiff line change
@@ -325,6 +325,25 @@ def test_explain(self):
325325

326326
self.assertEqual(result.structured_plan, expected)
327327

328+
result = redis_graph.explain("""MATCH (r:Rider), (t:Team)
329+
RETURN r.name, t.name""")
330+
expected = '''\
331+
Results
332+
Project
333+
Cartesian Product
334+
Node By Label Scan | (r:Rider)
335+
Node By Label Scan | (t:Team)'''
336+
self.assertEqual(str(result), expected)
337+
338+
expected = Operation('Results') \
339+
.append_child(Operation('Project')
340+
.append_child(Operation('Cartesian Product')
341+
.append_child(Operation('Node By Label Scan'))
342+
.append_child(Operation('Node By Label Scan'))
343+
))
344+
345+
self.assertEqual(result.structured_plan, expected)
346+
328347
redis_graph.delete()
329348

330349
def test_profile(self):

0 commit comments

Comments
 (0)
Please sign in to comment.