diff options
Diffstat (limited to 'networkx/testing/utils.py')
-rw-r--r-- | networkx/testing/utils.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/networkx/testing/utils.py b/networkx/testing/utils.py index 795cefad..68faf230 100644 --- a/networkx/testing/utils.py +++ b/networkx/testing/utils.py @@ -7,6 +7,15 @@ __all__ = [ def almost_equal(x, y, places=7): + import warnings + + warnings.warn( + ( + "`almost_equal` is deprecated and will be removed in version 3.0.\n" + "Use `pytest.approx` instead.\n" + ), + DeprecationWarning, + ) return round(abs(x - y), places) == 0 |