Skip the numpy doctests.
They seem like more trouble that they're worth.
This commit is contained in:
parent
b41852c93b
commit
50769557e8
|
@ -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
|
||||
|
|
|
@ -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,
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue