Skip to content

Commit 4ab4384

Browse files
authored
Merge pull request #380 from orazve/fix-alpha-rwr-23-test
Fix test - add min_inclusive for no-tier RWR API
2 parents 34303f7 + e8c0cde commit 4ab4384

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

graphdatascience/tests/integration/test_graph_ops.py

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,7 @@ def test_project_subgraph(runner: QueryRunner, gds: GraphDataScience) -> None:
8686
runner.run_query(f"CALL gds.graph.drop('{sub_G.name()}')")
8787

8888

89-
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
89+
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 4, 0))
9090
def test_sample_rwr(runner: QueryRunner, gds: GraphDataScience) -> None:
9191
from_G, _ = gds.graph.project(GRAPH_NAME, {"Node": {"properties": "x"}}, "*")
9292

@@ -101,6 +101,21 @@ def test_sample_rwr(runner: QueryRunner, gds: GraphDataScience) -> None:
101101
runner.run_query(f"CALL gds.graph.drop('{rwr_G.name()}')")
102102

103103

104+
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 2, 0))
105+
def test_sample_rwr_alpha(runner: QueryRunner, gds: GraphDataScience) -> None:
106+
from_G, _ = gds.graph.project(GRAPH_NAME, {"Node": {"properties": "x"}}, "*")
107+
108+
rwr_G, result = gds.alpha.graph.sample.rwr("s", from_G, samplingRatio=0.6, concurrency=1, randomSeed=42)
109+
110+
assert rwr_G.name() == "s"
111+
assert result["graphName"] == "s"
112+
113+
result2 = gds.graph.list(rwr_G)
114+
assert result2["nodeCount"][0] == 2
115+
116+
runner.run_query(f"CALL gds.graph.drop('{rwr_G.name()}')")
117+
118+
104119
@pytest.mark.compatible_with(min_inclusive=ServerVersion(2, 4, 0))
105120
def test_sample_cnarw(runner: QueryRunner, gds: GraphDataScience) -> None:
106121
from_G, _ = gds.graph.project(GRAPH_NAME, {"Node": {"properties": "x"}}, "*")

0 commit comments

Comments
 (0)