Skip to content

Commit

Permalink
Adds xfail for test incompatible with pytest>=8.
Browse files Browse the repository at this point in the history
  • Loading branch information
rlratzel committed Jan 31, 2024
1 parent 71a9301 commit 64e945a
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions python/nx-cugraph/nx_cugraph/interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,18 +80,26 @@ def key(testpath):
nxver = parse(nx.__version__)

if nxver.major == 3 and nxver.minor <= 2:
# Networkx versions prior to 3.2.1 have tests written to expect
# sp.sparse.linalg.ArpackNoConvergence exceptions raised on no
# convergence in HITS. Newer versions since the merge of
# https://github.com/networkx/networkx/pull/7084 expect
# nx.PowerIterationFailedConvergence, which is what nx_cugraph.hits
# raises, so we mark them as xfail for previous versions of NX.
xfail.update(
{
# NetworkX versions prior to 3.2.1 have tests written to
# expect sp.sparse.linalg.ArpackNoConvergence exceptions
# raised on no convergence in HITS. Newer versions since
# the merge of
# https://github.com/networkx/networkx/pull/7084 expect
# nx.PowerIterationFailedConvergence, which is what
# nx_cugraph.hits raises, so we mark them as xfail for
# previous versions of NX.
key(
"test_hits.py:TestHITS.test_hits_not_convergent"
): "nx_cugraph.hits raises updated exceptions not caught in "
"these tests",
# NetworkX versions 3.2 and older contain tests that fail
# with pytest>=8. Assume pytest>=8 and mark xfail.
key(
"test_strongly_connected.py:"
"TestStronglyConnected.test_connected_raise"
): "test is incompatible with pytest>=8",
}
)

Expand Down

0 comments on commit 64e945a

Please sign in to comment.