From 91bcfe285aea8553c897c09372df494e3c5f43bc Mon Sep 17 00:00:00 2001 From: semyonsinchenko Date: Thu, 26 Jun 2025 07:43:48 +0200 Subject: [PATCH] make pytest more robust --- python/tests/test_graphframes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/tests/test_graphframes.py b/python/tests/test_graphframes.py index 1a889ee37..7da78324a 100644 --- a/python/tests/test_graphframes.py +++ b/python/tests/test_graphframes.py @@ -151,14 +151,14 @@ def test_power_iteration_clustering(spark): e=spark.createDataFrame(vertices).toDF("src", "dst", "weight"), ) - clusters = [ - r["cluster"] + clusters = { + r["id"]: r["cluster"] for r in g.powerIterationClustering(k=2, maxIter=40, weightCol="weight") .sort("id") .collect() - ] + } - assert clusters == [0, 0, 0, 0, 1, 0] + assert clusters == {0: 0, 1: 0, 2: 0, 3: 0, 4: 1, 5: 0} def test_page_rank(spark):