Skip to content

Commit f862260

Browse files
committed
Ignore remote-ops tests for bugged built-in version
will be improved in the future once we include the Cypher-API in the bundle for self-managed
1 parent 226a23d commit f862260

File tree

1 file changed

+27
-12
lines changed

1 file changed

+27
-12
lines changed

graphdatascience/tests/integration/test_remote_graph_ops.py

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import Generator
22

3+
import neo4j
34
import pytest
45

56
from graphdatascience.server_version.server_version import ServerVersion
@@ -79,8 +80,11 @@ def test_remote_projection_and_writeback_custom_database_name(gds_with_cloud_set
7980
nodes_with_wcc_default_db = gds_with_cloud_setup.run_cypher(count_wcc_nodes_query).squeeze()
8081
else:
8182
# we get a warning because property wcc doesn't exist in the database -- which is good!
82-
with pytest.warns(RuntimeWarning):
83+
if neo4j.__version__.startswith("6."):
8384
nodes_with_wcc_default_db = gds_with_cloud_setup.run_cypher(count_wcc_nodes_query).squeeze()
85+
else:
86+
with pytest.warns(RuntimeWarning):
87+
nodes_with_wcc_default_db = gds_with_cloud_setup.run_cypher(count_wcc_nodes_query).squeeze()
8488
assert nodes_with_wcc_default_db == 0
8589
finally:
8690
gds_with_cloud_setup.run_cypher("DROP DATABASE $dbName IF EXISTS", {"dbName": OTHER_DB})
@@ -108,22 +112,28 @@ def test_remote_write_back_page_rank(gds_with_cloud_setup: AuraGraphDataScience)
108112
assert result["nodePropertiesWritten"] == 3
109113

110114

115+
@pytest.mark.skip(reason="Built-in remote-ops are bugged in Neo4j <2025.10")
111116
@pytest.mark.cloud_architecture
112117
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
113118
def test_remote_write_back_node_similarity(gds_with_cloud_setup: AuraGraphDataScience) -> None:
114-
G, result = gds_with_cloud_setup.graph.project(GRAPH_NAME, "MATCH (n)-->(m) RETURN gds.graph.project.remote(n, m)")
119+
G, _ = gds_with_cloud_setup.v2.graph.project(GRAPH_NAME, "MATCH (n)-->(m) RETURN gds.graph.project.remote(n, m)")
115120

116-
result = gds_with_cloud_setup.nodeSimilarity.write(
117-
G, writeRelationshipType="SIMILAR", writeProperty="score", similarityCutoff=0
121+
gds_with_cloud_setup.nodeSimilarity.mutate(
122+
gds_with_cloud_setup.graph.get(G.name()),
123+
mutateRelationshipType="SIMILAR",
124+
mutateProperty="score",
125+
similarityCutoff=0,
118126
)
119127

120-
assert result["relationshipsWritten"] == 2
128+
result = gds_with_cloud_setup.v2.graph.relationships.write(G, "SIMILAR", ["score"])
129+
130+
assert result.properties_written == 2
121131

122132

123133
@pytest.mark.cloud_architecture
124134
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
125135
def test_remote_write_back_node_properties(gds_with_cloud_setup: AuraGraphDataScience) -> None:
126-
G, result = gds_with_cloud_setup.graph.project(GRAPH_NAME, "MATCH (n)-->(m) RETURN gds.graph.project.remote(n, m)")
136+
G, _ = gds_with_cloud_setup.graph.project(GRAPH_NAME, "MATCH (n)-->(m) RETURN gds.graph.project.remote(n, m)")
127137
result = gds_with_cloud_setup.pageRank.mutate(G, mutateProperty="score")
128138
result = gds_with_cloud_setup.graph.nodeProperties.write(G, node_properties=["score"])
129139

@@ -157,6 +167,7 @@ def test_remote_write_back_node_properties_with_select_labels(gds_with_cloud_set
157167
assert result["propertiesWritten"] == 1
158168

159169

170+
@pytest.mark.skip(reason="Built-in remote-ops are bugged in Neo4j <2025.10")
160171
@pytest.mark.cloud_architecture
161172
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
162173
def test_remote_write_back_node_label(gds_with_cloud_setup: AuraGraphDataScience) -> None:
@@ -166,30 +177,33 @@ def test_remote_write_back_node_label(gds_with_cloud_setup: AuraGraphDataScience
166177
assert result["nodeLabelsWritten"] == 3
167178

168179

180+
@pytest.mark.skip(reason="Built-in remote-ops are bugged in Neo4j <2025.10")
169181
@pytest.mark.cloud_architecture
170182
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
171183
def test_remote_write_back_relationship_topology(gds_with_cloud_setup: AuraGraphDataScience) -> None:
172-
G, result = gds_with_cloud_setup.graph.project(
184+
G, _ = gds_with_cloud_setup.v2.graph.project(
173185
GRAPH_NAME, "MATCH (n)-->(m) RETURN gds.graph.project.remote(n, m, {relationshipType: 'FOO'})"
174186
)
175-
result = gds_with_cloud_setup.graph.relationship.write(G, "FOO")
187+
result = gds_with_cloud_setup.v2.graph.relationships.write(G, "FOO")
176188

177-
assert result["relationshipsWritten"] == 4
189+
assert result.relationships_written == 4
178190

179191

192+
@pytest.mark.skip(reason="Built-in remote-ops are bugged in Neo4j <2025.10")
180193
@pytest.mark.cloud_architecture
181194
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
182195
def test_remote_write_back_relationship_property(gds_with_cloud_setup: AuraGraphDataScience) -> None:
183-
G, result = gds_with_cloud_setup.graph.project(
196+
G, _ = gds_with_cloud_setup.v2.graph.project(
184197
GRAPH_NAME,
185198
"MATCH (n)-->(m) "
186199
"RETURN gds.graph.project.remote(n, m, {relationshipType: 'FOO', relationshipProperties: {bar: 42}})",
187200
)
188-
result = gds_with_cloud_setup.graph.relationship.write(G, "FOO", "bar")
201+
result = gds_with_cloud_setup.v2.graph.relationships.write(G, "FOO", ["bar"])
189202

190-
assert result["relationshipsWritten"] == 4
203+
assert result.relationships_written == 4
191204

192205

206+
@pytest.mark.skip(reason="Built-in remote-ops are bugged in Neo4j <2025.10")
193207
@pytest.mark.cloud_architecture
194208
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
195209
def test_remote_write_back_relationship_properties(gds_with_cloud_setup: AuraGraphDataScience) -> None:
@@ -207,6 +221,7 @@ def test_remote_write_back_relationship_properties(gds_with_cloud_setup: AuraGra
207221
assert result["relationshipsWritten"] == 4
208222

209223

224+
@pytest.mark.skip(reason="Built-in remote-ops are bugged in Neo4j <2025.10")
210225
@pytest.mark.cloud_architecture
211226
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 7, 0))
212227
def test_remote_write_back_relationship_property_from_pathfinding_algo(

0 commit comments

Comments
 (0)