Skip to content

Commit 61b9c4a

Browse files
committed
Fix tests failing against community GDS
1 parent b52d556 commit 61b9c4a

File tree

3 files changed

+11
-3
lines changed

3 files changed

+11
-3
lines changed

graphdatascience/tests/integration/test_graph_construct.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -521,11 +521,15 @@ def test_graph_alpha_construct_backward_compat_without_arrow(gds_without_arrow:
521521

522522

523523
@pytest.mark.skip_on_aura # No warning produced when running on Aura
524-
def test_nodes_only_without__arrow(gds_without_arrow: GraphDataScience) -> None:
524+
def test_nodes_only_without_arrow(gds_without_arrow: GraphDataScience) -> None:
525525
nodes = DataFrame({"nodeId": [0], "labels": ["person"]})
526526
relationships = DataFrame({"sourceNodeId": [], "targetNodeId": [], "relationshipType": []})
527527

528-
with pytest.warns(UserWarning):
528+
if gds_without_arrow.is_licensed():
529+
# on enterprise users should use arrow for construct
530+
with pytest.warns(UserWarning):
531+
G = gds_without_arrow.graph.construct(graph_name="my_graph", nodes=nodes, relationships=relationships)
532+
else:
529533
G = gds_without_arrow.graph.construct(graph_name="my_graph", nodes=nodes, relationships=relationships)
530534

531535
try:

graphdatascience/tests/integration/test_graph_ops.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ def test_graph_nodeProperty_stream_raise_error_with_duplicate_keys(gds: GraphDat
418418
gds.graph.nodeProperty.stream(G, "x", db_node_properties=["x", "z", "name"], concurrency=2)
419419

420420

421+
@pytest.mark.enterprise
421422
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
422423
def test_graph_nodeProperties_stream_with_arrow(gds: GraphDataScience) -> None:
423424
G, _ = gds.graph.project(GRAPH_NAME, {"Node": {"properties": ["x", "y"]}}, "*")
@@ -441,6 +442,7 @@ def test_graph_nodeProperties_stream_with_arrow(gds: GraphDataScience) -> None:
441442
assert {e for e in name_values["propertyValue"]} == {"nodeA", "nodeB", "nodeC"}
442443

443444

445+
@pytest.mark.enterprise
444446
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 5, 0))
445447
def test_graph_nodeProperties_stream_listNodeLabels_with_arrow(gds: GraphDataScience) -> None:
446448
G, _ = gds.graph.project(GRAPH_NAME, {"Node": {"properties": ["x"]}}, "*")

graphdatascience/tests/integration/test_system_ops.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,4 +109,6 @@ def test_restore(gds: GraphDataScience) -> None:
109109
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 5, 0))
110110
def test_deprecated_endpoints(gds: GraphDataScience) -> None:
111111
gds.beta.listProgress()
112-
gds.alpha.systemMonitor()
112+
113+
if gds.is_licensed():
114+
gds.alpha.systemMonitor()

0 commit comments

Comments
 (0)