Skip the numpy doctests.

They seem like more trouble that they're worth.
This commit is contained in:
Kale Kundert 2017-06-15 14:53:27 -07:00
parent b41852c93b
commit 50769557e8
No known key found for this signature in database
GPG Key ID: C6238221D17CAFAE
2 changed files with 3 additions and 3 deletions

View File

@ -315,7 +315,8 @@ def approx(expected, rel=None, abs=None, nan_ok=False):
And ``numpy`` arrays::
>>> np.array([0.1, 0.2]) + np.array([0.2, 0.4]) == approx(np.array([0.3, 0.6]))
>>> import numpy as np # doctest: +SKIP
>>> np.array([0.1, 0.2]) + np.array([0.2, 0.4]) == approx(np.array([0.3, 0.6])) # doctest: +SKIP
True
By default, ``approx`` considers numbers within a relative tolerance of

View File

@ -350,11 +350,10 @@ class TestApprox(object):
assert a21 != approx(a12)
def test_doctests(self):
np = pytest.importorskip('numpy')
parser = doctest.DocTestParser()
test = parser.get_doctest(
approx.__doc__,
{'approx': approx ,'np': np},
{'approx': approx},
approx.__name__,
None, None,
)