Skip to content

Commit 9f15ffe

Browse files
committed
Remove redundant tests, rename some cases
1 parent c8e0c58 commit 9f15ffe

File tree

1 file changed

+15
-25
lines changed

1 file changed

+15
-25
lines changed

graphdatascience/tests/integration/test_graph_ops.py

Lines changed: 15 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ def test_graph_streamRelationshipProperties_with_arrow(gds: GraphDataScience) ->
652652

653653

654654
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
655-
def test_graph_relationshipProperties_stream_with_arrow(gds: GraphDataScience) -> None:
655+
def test_graph_relationshipProperties_stream(gds: GraphDataScience) -> None:
656656
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
657657

658658
result = gds.graph.relationshipProperties.stream(G, ["relX", "relY"], concurrency=2)
@@ -671,7 +671,7 @@ def test_graph_relationshipProperties_stream_with_arrow(gds: GraphDataScience) -
671671
assert {e for e in y_values["propertyValue"]} == {5, 6, 7}
672672

673673

674-
def test_graph_streamRelationshipProperties_with_arrow_separate_property_columns(gds: GraphDataScience) -> None:
674+
def test_graph_streamRelationshipProperties_separate_property_columns_dep(gds: GraphDataScience) -> None:
675675
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
676676

677677
with pytest.warns(DeprecationWarning):
@@ -685,7 +685,18 @@ def test_graph_streamRelationshipProperties_with_arrow_separate_property_columns
685685

686686

687687
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
688-
def test_graph_relationshipProperties_stream_with_arrow_rel_as_str(gds: GraphDataScience) -> None:
688+
def test_graph_relationshipProperties_stream_separate_property_columns(gds: GraphDataScience) -> None:
689+
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
690+
691+
result = gds.graph.relationshipProperties.stream(G, ["relX", "relY"], separate_property_columns=True, concurrency=2)
692+
693+
assert list(result.keys()) == ["sourceNodeId", "targetNodeId", "relationshipType", "relX", "relY"]
694+
assert {e for e in result["relX"]} == {4, 5, 6}
695+
assert {e for e in result["relY"]} == {5, 6, 7}
696+
697+
698+
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
699+
def test_graph_relationshipProperties_stream_rel_as_str(gds: GraphDataScience) -> None:
689700
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
690701

691702
result = gds.graph.relationshipProperties.stream(G, ["relX", "relY"], "REL", concurrency=2)
@@ -705,7 +716,7 @@ def test_graph_relationshipProperties_stream_with_arrow_rel_as_str(gds: GraphDat
705716

706717

707718
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
708-
def test_graph_relationshipProperties_stream_with_arrow_rel_as_str_sep(gds: GraphDataScience) -> None:
719+
def test_graph_relationshipProperties_stream_rel_as_str_separate_property_columns(gds: GraphDataScience) -> None:
709720
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
710721

711722
result = gds.graph.relationshipProperties.stream(
@@ -724,27 +735,6 @@ def test_graph_relationshipProperties_stream_with_arrow_rel_as_str_sep(gds: Grap
724735
assert {e for e in result["relY"]} == {5, 6, 7}
725736

726737

727-
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
728-
def test_graph_relationshipProperties_stream_with_arrow_rel_as_str_separate(gds: GraphDataScience) -> None:
729-
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
730-
731-
result = gds.graph.relationshipProperties.stream(G, ["relX"], ["REL"], separate_property_columns=True)
732-
733-
assert list(result.keys()) == ["sourceNodeId", "targetNodeId", "relationshipType", "relX"]
734-
assert {e for e in result["relX"]} == {4, 5, 6}
735-
736-
737-
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
738-
def test_graph_relationshipProperties_stream_with_arrow_separate_property_columns(gds: GraphDataScience) -> None:
739-
G, _ = gds.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
740-
741-
result = gds.graph.relationshipProperties.stream(G, ["relX", "relY"], separate_property_columns=True, concurrency=2)
742-
743-
assert list(result.keys()) == ["sourceNodeId", "targetNodeId", "relationshipType", "relX", "relY"]
744-
assert {e for e in result["relX"]} == {4, 5, 6}
745-
assert {e for e in result["relY"]} == {5, 6, 7}
746-
747-
748738
def test_graph_streamRelationshipProperties_without_arrow(gds_without_arrow: GraphDataScience) -> None:
749739
G, _ = gds_without_arrow.graph.project(GRAPH_NAME, "*", {"REL": {"properties": ["relX", "relY"]}})
750740

0 commit comments

Comments
 (0)