summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShachar Pashchur <s.pashchur@gmail.com>2022-12-22 12:28:34 +0200
committerShachar Pashchur <s.pashchur@gmail.com>2022-12-22 12:28:34 +0200
commita5111e7e9d86a069e3baab41efe45c8ce23c6096 (patch)
tree60d3b926346acb0e0dadadcf9f0ee44385cd091a
parent28d53c0ae3001ef77792d67d92a70d32dbecc5ee (diff)
downloadredis-py-Pipeline.tar.gz
mark pipeline tests as commentPipeline
-rw-r--r--tests/test_graph.py70
1 files changed, 50 insertions, 20 deletions
diff --git a/tests/test_graph.py b/tests/test_graph.py
index 5256060..79b4e90 100644
--- a/tests/test_graph.py
+++ b/tests/test_graph.py
@@ -122,26 +122,56 @@ def test_path(client):
assert expected_results == result.result_set
-@pytest.mark.redismod
-def test_path_in_pipeline(client):
- node0 = Node(node_id=0, label="L1")
- node1 = Node(node_id=1, label="L1")
- edge01 = Edge(node0, "R1", node1, edge_id=0, properties={"value": 1})
-
- pipe = client.graph().pipeline()
- pipe.add_node(node0)
- pipe.add_node(node1)
- pipe.add_edge(edge01)
- pipe.flush()
-
- path01 = Path.new_empty_path().add_node(node0).add_edge(edge01).add_node(node1)
- expected_results = [[path01]]
-
- query = "MATCH p=(:L1)-[:R1]->(:L1) RETURN p ORDER BY p"
- result = pipe.query(query)
- print("pipe.execute(): ")
- print(pipe.execute())
- assert expected_results == result.result_set
+# @pytest.mark.redismod
+# def test_path_in_pipeline(client):
+# node0 = Node(node_id=0, label="L1")
+# node1 = Node(node_id=1, label="L1")
+# edge01 = Edge(node0, "R1", node1, edge_id=0, properties={"value": 1})
+
+# pipe = client.graph().pipeline()
+# pipe.add_node(node0)
+# pipe.add_node(node1)
+# pipe.add_edge(edge01)
+# pipe.flush()
+
+# path01 = Path.new_empty_path().add_node(node0).add_edge(edge01).add_node(node1)
+# expected_results = [[path01]]
+
+# query = "MATCH p=(:L1)-[:R1]->(:L1) RETURN p ORDER BY p"
+# result = pipe.query(query)
+# print("pipe.execute(): ")
+# print(pipe.execute())
+# assert expected_results == result.result_set
+
+
+# @pytest.mark.redismod
+# def test_array_functions_in_pipeline(client):
+# print("\n1\n")
+# pipe = client.graph().pipeline()
+# print("\n11\n")
+# query = """CREATE (p:person{name:'a',age:32, array:[0,1,2]})"""
+# print("\n111\n")
+# pipe.query(query)
+# pipe.execute()
+# print("\n2\n")
+# query = """WITH [0,1,2] as x return x"""
+# pipe.query(query)
+# print("\n3\n")
+
+# query = """MATCH(n) return collect(n)"""
+# pipe.query(query)
+# print("\n4\n")
+
+# a = Node(
+# node_id=0,
+# label="person",
+# properties={"name": "a", "age": 32, "array": [0, 1, 2]},
+# )
+# print("\n5\n")
+# result = pipe.execute()
+# print("\nThe result is: ", result, "\n")
+# assert [0, 1, 2] == result[0].result_set[0][0]
+# assert [a] == result[1].result_set[0][0]
@pytest.mark.redismod