@@ -78,8 +78,11 @@ $ pytest --pyargs scpdt
78
78
79
79
## Usage
80
80
81
- The API of the package closely follows that of the standard ` doctest ` module.
82
- We strive to provide drop-in replacements, or nearly so.
81
+ The API of the package has two layers: the basic layer follows the API of the
82
+ standard library ` doctest ` module, and we strive to provide drop-in replacements,
83
+ or nearly so.
84
+
85
+ The other layer is the ` pytest ` plugin.
83
86
84
87
85
88
### Basic usage
@@ -100,7 +103,7 @@ For more details, see the `testmod` docstring. Other useful functions are
100
103
` find_doctests ` , ` run_docstring_examples ` and ` testfile ` (the latter two mimic
101
104
the behavior of the eponymous functions of the ` doctest ` module).
102
105
103
- ### Command-line interface
106
+ #### Command-line interface
104
107
105
108
There is a basic CLI, which also mimics that of the ` doctest ` module:
106
109
```
@@ -116,7 +119,7 @@ $ python -m scpdt bar.rst
116
119
```
117
120
118
121
119
- ### More fine-grained control
122
+ #### More fine-grained control
120
123
121
124
More fine-grained control of the functionality is available via the following
122
125
classes
@@ -136,7 +139,7 @@ passing the instance to `testmod` or constructors of `DT*` objects. Defaults
136
139
are provided, based on a long-term usage in SciPy.
137
140
138
141
139
- ## The Scpdt Pytest Plugin
142
+ ### The Scpdt Pytest Plugin
140
143
141
144
The pytest plugin enables the use of scpdt tools to perform doctests.
142
145
@@ -171,13 +174,6 @@ To run doctests on specific SciPy modules, e.g: `cluster`, use the following com
171
174
python dev.py test --doctests -s cluster
172
175
```
173
176
174
- In case you encounter an ` ImportPathMismatchError ` , a known pytest bug, resolve it by setting the ` PY_IGNORE_IMPORTMISMATCH ` environment variable:
175
-
176
- ``` bash
177
- export PY_IGNORE_IMPORTMISMATCH=1
178
- ```
179
- For more information, see this [ github issue] ( https://github.com/ev-br/scpdt/issues/92 ) .
180
-
181
177
### Running Doctests on Other Packages/Projects
182
178
183
179
If you want to run doctests on packages or projects other than SciPy, follow these steps:
@@ -278,10 +274,9 @@ Happy testing!
278
274
some maintenance work may be required to adapt when ` pytest ` publishes a new
279
275
release.
280
276
281
- This project takes a different approach: we closely follow the ` doctest ` API and
282
- implementation, which are naturally way more stable then ` pytest ` . Cooking up
283
- a ` pytest ` plugin on top of this package is certainly doable and only needs a
284
- champion.
277
+ This project takes a different approach: in addition to plugging into ` pytest ` ,
278
+ we closely follow the ` doctest ` API and implementation, which are naturally
279
+ way more stable then ` pytest ` .
285
280
286
281
- ` NumPy ` and ` SciPy ` use modified doctesting in their ` refguide-check ` utilities.
287
282
These utilities are tightly coupled to their libraries, and have been reported
0 commit comments