diff options
author | Erik Welch <erik.n.welch@gmail.com> | 2023-05-13 07:27:50 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-13 14:27:50 +0200 |
commit | 797638345d3a31cd4fff8570a8df07d31e90022e (patch) | |
tree | 0ca5cb6e7df7757bb64e08feb6982011d60094f5 /networkx/algorithms/operators/tests/test_binary.py | |
parent | 90bb1f0705f34c6570fe9fa537f672f9ddb3372c (diff) | |
download | networkx-797638345d3a31cd4fff8570a8df07d31e90022e.tar.gz |
Handle weights as `distance=` in testing dispatch (#6671)
* Handle weights as `distance=` in testing dispatch
* fix `test_intersection`
This change was suggested here:
https://github.com/python-graphblas/graphblas-algorithms/pull/62#issuecomment-1531810715
Diffstat (limited to 'networkx/algorithms/operators/tests/test_binary.py')
-rw-r--r-- | networkx/algorithms/operators/tests/test_binary.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/networkx/algorithms/operators/tests/test_binary.py b/networkx/algorithms/operators/tests/test_binary.py index d358265e..59423c88 100644 --- a/networkx/algorithms/operators/tests/test_binary.py +++ b/networkx/algorithms/operators/tests/test_binary.py @@ -52,7 +52,8 @@ def test_intersection(): I2 = nx.intersection(G2, H2) assert set(I2.nodes()) == {1, 2, 3, 4} assert sorted(I2.edges()) == [(2, 3)] - if os.environ.get("NETWORKX_GRAPH_CONVERT", None) != "nx-loopback": + # Only test if not performing auto convert testing of backend implementations + if os.environ.get("NETWORKX_GRAPH_CONVERT", None) is None: with pytest.raises(TypeError): nx.intersection(G2, H) with pytest.raises(TypeError): |