@@ -151,7 +151,7 @@ $ pytest --pyargs <your-package> --doctest-modules --doctest-collect=api
151
151
See [ More fine-grained control] ( #more-fine-grained-control ) section
152
152
for details on how to customize the behavior.
153
153
154
- ** NOTE ** Currently, ` pytest --doctest-modules ` only collects doctests and skips
154
+ ** NOTE** Currently, ` pytest --doctest-modules ` only collects doctests and skips
155
155
'regular' unit tests. This differs from the vanilla ` pytest ` behavior, which collects
156
156
both doctests and unit tests.
157
157
The behavior will change in a future version: ` scipy-doctest==2.0 ` ** will change the
@@ -402,13 +402,19 @@ adding `--assert=plain` is reasonable.
402
402
- ` pytest-doctestplus ` plugin from the ` AstroPy ` project has similar goals.
403
403
The package is well established and widely used. From a user perspective, main
404
404
differences are: (i) ` pytest-doctestplus ` is more sensitive to formatting,
405
- including whitespace---thus if numpy tweaks its output formatting, doctests
406
- may start failing; (ii) there is still a need for ` # doctest: +FLOAT_CMP `
405
+ including whitespace; (ii) there is still a need for ` # doctest: +FLOAT_CMP `
407
406
directives.
408
407
409
- This project takes a different approach: in addition to plugging into ` pytest ` ,
410
- we closely follow the ` doctest ` API and implementation, which are naturally
411
- way more stable then ` pytest ` .
408
+ This project takes a slightly different approach: we strive to make numeric comparisons
409
+ whitespace insensitive and automatic, without a need for explicit markup. For rare cases
410
+ which require additional configuration, we either keep it in the tool (thus out of
411
+ reader-visible docstrings), or provide human-readable markers (hence ` # may vary `
412
+ not ` # doctest +SKIP ` ).
413
+ Furthermore, in addition to plugging into ` pytest ` , we provide an API layer which closely
414
+ follows the ` doctest ` API. Essentially all aspects of doctesting are user-configurable.
415
+
416
+ - ` xdoctest ` package relies on a deeper rewrite of the standard-library ` doctest `
417
+ functionality, and uses an AST-based analysis to parse code examples out of docstrings.
412
418
413
419
- ` NumPy ` and ` SciPy ` were using modified doctesting in their ` refguide-check ` utilities.
414
420
These utilities are tightly coupled to their libraries, and have been reported
0 commit comments