commit 898d66c7eeabddf5d17bb899c8beebe5aad2c4ee Author: Oscar Benjamin Date: Thu Jan 3 17:15:04 2019 +0000 Inline np.allclose to remove dependency on numpy Index: pytest-doctestplus-0.4.0/pytest_doctestplus/output_checker.py =================================================================== --- pytest-doctestplus-0.4.0.orig/pytest_doctestplus/output_checker.py +++ pytest-doctestplus-0.4.0/pytest_doctestplus/output_checker.py @@ -6,8 +6,7 @@ normalizations of Python expression outp import doctest import re - -import numpy as np +import math import six from six.moves import zip @@ -125,8 +124,10 @@ class OutputChecker(doctest.OutputChecke else: nw_.append(nw) - if not np.allclose(float(ng), float(nw), rtol=self.rtol, - atol=self.atol, equal_nan=True): + ng = float(ng) + nw = float(nw) + if not (abs(ng - nw) <= self.atol + self.rtol * abs(nw) + or (math.isnan(ng) and math.isnan(nw))): return False # replace all floats in the "got" string by those from "wanted". Index: pytest-doctestplus-0.4.0/setup.py =================================================================== --- pytest-doctestplus-0.4.0.orig/setup.py +++ pytest-doctestplus-0.4.0/setup.py @@ -40,7 +40,7 @@ setup( 'Topic :: Utilities', ], keywords=['doctest', 'rst', 'pytest', 'py.test'], - install_requires=['six', 'pytest>=3.0', 'numpy>=1.10'], + install_requires=['six', 'pytest>=3.0'], python_requires='>=2.7', entry_points={ 'pytest11': [