From bf5b97360a95c642c08a99b46f5d0ab5410d922b Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 19 Oct 2023 12:15:45 -0500 Subject: [PATCH 1/2] nx-cugraph: xfail test_louvain.py:test_threshold in Python 3.9 --- python/nx-cugraph/nx_cugraph/interface.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/python/nx-cugraph/nx_cugraph/interface.py b/python/nx-cugraph/nx_cugraph/interface.py index 124b86a4af2..22bb2c183af 100644 --- a/python/nx-cugraph/nx_cugraph/interface.py +++ b/python/nx-cugraph/nx_cugraph/interface.py @@ -12,6 +12,8 @@ # limitations under the License. from __future__ import annotations +import sys + import networkx as nx import nx_cugraph as nxcg @@ -174,12 +176,13 @@ def key(testpath): ): louvain_different, key("test_louvain.py:test_none_weight_param"): louvain_different, key("test_louvain.py:test_multigraph"): louvain_different, - # See networkx#6630 - key( - "test_louvain.py:test_undirected_selfloops" - ): "self-loops not handled in Louvain", } ) + if sys.version_info[:2] == (3, 9): + # This test is sensitive to RNG, which depends on Python version + xfail[ + key("test_louvain.py:test_threshold") + ] = "Louvain does not support seed parameter" for item in items: kset = set(item.keywords) From 5a9f0e88ed6baffcf057eee7108b5558ca7a9dec Mon Sep 17 00:00:00 2001 From: Erik Welch Date: Thu, 19 Oct 2023 20:34:13 -0500 Subject: [PATCH 2/2] oops, don't know how that got lost --- python/nx-cugraph/nx_cugraph/interface.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/python/nx-cugraph/nx_cugraph/interface.py b/python/nx-cugraph/nx_cugraph/interface.py index 22bb2c183af..a7b88b72ec5 100644 --- a/python/nx-cugraph/nx_cugraph/interface.py +++ b/python/nx-cugraph/nx_cugraph/interface.py @@ -176,6 +176,10 @@ def key(testpath): ): louvain_different, key("test_louvain.py:test_none_weight_param"): louvain_different, key("test_louvain.py:test_multigraph"): louvain_different, + # See networkx#6630 + key( + "test_louvain.py:test_undirected_selfloops" + ): "self-loops not handled in Louvain", } ) if sys.version_info[:2] == (3, 9):