diff options
Diffstat (limited to 'networkx/algorithms/assortativity/tests/test_connectivity.py')
-rw-r--r-- | networkx/algorithms/assortativity/tests/test_connectivity.py | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/networkx/algorithms/assortativity/tests/test_connectivity.py b/networkx/algorithms/assortativity/tests/test_connectivity.py index b1b0ac81..dd12d9bb 100644 --- a/networkx/algorithms/assortativity/tests/test_connectivity.py +++ b/networkx/algorithms/assortativity/tests/test_connectivity.py @@ -3,7 +3,6 @@ from itertools import permutations import pytest import networkx as nx -from networkx.testing import almost_equal class TestNeighborConnectivity: @@ -86,9 +85,9 @@ class TestNeighborConnectivity: nd = nx.average_degree_connectivity(G)[5] assert nd == 1.8 nd = nx.average_degree_connectivity(G, weight="weight")[5] - assert almost_equal(nd, 3.222222, places=5) + assert nd == pytest.approx(3.222222, abs=1e-5) nd = nx.k_nearest_neighbors(G, weight="weight")[5] - assert almost_equal(nd, 3.222222, places=5) + assert nd == pytest.approx(3.222222, abs=1e-5) def test_zero_deg(self): G = nx.DiGraph() |