summaryrefslogtreecommitdiff
path: root/networkx/algorithms/assortativity/tests/test_neighbor_degree.py
diff options
context:
space:
mode:
Diffstat (limited to 'networkx/algorithms/assortativity/tests/test_neighbor_degree.py')
-rw-r--r--networkx/algorithms/assortativity/tests/test_neighbor_degree.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/networkx/algorithms/assortativity/tests/test_neighbor_degree.py b/networkx/algorithms/assortativity/tests/test_neighbor_degree.py
index 51b4aa86..65827da1 100644
--- a/networkx/algorithms/assortativity/tests/test_neighbor_degree.py
+++ b/networkx/algorithms/assortativity/tests/test_neighbor_degree.py
@@ -1,5 +1,5 @@
+import pytest
import networkx as nx
-from networkx.testing import almost_equal
class TestAverageNeighbor:
@@ -73,4 +73,4 @@ class TestAverageNeighbor:
nd = nx.average_neighbor_degree(G)[5]
assert nd == 1.8
nd = nx.average_neighbor_degree(G, weight="weight")[5]
- assert almost_equal(nd, 3.222222, places=5)
+ assert nd == pytest.approx(3.222222, abs=1e-5)