@@ -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 ))
9090def 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 ))
105120def test_sample_cnarw (runner : QueryRunner , gds : GraphDataScience ) -> None :
106121 from_G , _ = gds .graph .project (GRAPH_NAME , {"Node" : {"properties" : "x" }}, "*" )
0 commit comments