diff options
| author | Matthew Brett <matthew.brett@gmail.com> | 2011-08-15 14:37:10 -0700 |
|---|---|---|
| committer | Charles Harris <charlesr.harris@gmail.com> | 2011-08-16 10:44:29 -0600 |
| commit | 57747fcc8179eacd9a6920e6a2f69dedb08834da (patch) | |
| tree | 7908d615ac7065e56e60c60f2b2b7cd179800b88 /numpy/testing | |
| parent | 316d1f4ec9e033b21062b8f2dcdddeef01d7a889 (diff) | |
| download | numpy-57747fcc8179eacd9a6920e6a2f69dedb08834da.tar.gz | |
ENH: skip doctests for tests
There are various docstrings show examples of how to run the tests, and
give example test output. Obviously the test output changes, and
running the doctests for the testing package:
import numpy.testing as npt
npt.test(doctests=True)
will cause several large sets of tests to be run in the rest of the
tree. So I skipped these.
Diffstat (limited to 'numpy/testing')
| -rw-r--r-- | numpy/testing/nosetester.py | 15 | ||||
| -rw-r--r-- | numpy/testing/utils.py | 5 |
2 files changed, 9 insertions, 11 deletions
diff --git a/numpy/testing/nosetester.py b/numpy/testing/nosetester.py index 4d716ca25..d6df51b0c 100644 --- a/numpy/testing/nosetester.py +++ b/numpy/testing/nosetester.py @@ -287,24 +287,23 @@ class NoseTester(object): Notes ----- Each NumPy module exposes `test` in its namespace to run all tests for it. - For example, to run all tests for numpy.lib:: + For example, to run all tests for numpy.lib: - >>> np.lib.test() + >>> np.lib.test() #doctest: +SKIP Examples -------- - >>> result = np.lib.test() + >>> result = np.lib.test() #doctest: +SKIP Running unit tests for numpy.lib ... Ran 976 tests in 3.933s OK - >>> result.errors + >>> result.errors #doctest: +SKIP [] - >>> result.knownfail + >>> result.knownfail #doctest: +SKIP [] - """ # cap verbosity at 3 because nose becomes *very* verbose beyond that @@ -368,7 +367,7 @@ class NoseTester(object): Examples -------- - >>> success = np.lib.bench() + >>> success = np.lib.bench() #doctest: +SKIP Running benchmarks for numpy.lib ... using 562341 items: @@ -381,7 +380,7 @@ class NoseTester(object): ... OK - >>> success + >>> success #doctest: +SKIP True """ diff --git a/numpy/testing/utils.py b/numpy/testing/utils.py index 423c75527..f0c4cae44 100644 --- a/numpy/testing/utils.py +++ b/numpy/testing/utils.py @@ -954,10 +954,9 @@ def rundocs(filename=None, raise_on_error=True): ----- The doctests can be run by the user/developer by adding the ``doctests`` argument to the ``test()`` call. For example, to run all tests (including - doctests) for `numpy.lib`:: - - >>> np.lib.test(doctests=True) + doctests) for `numpy.lib`: + >>> np.lib.test(doctests=True) #doctest: +SKIP """ import doctest, imp if filename is None: |
