Skip to content

Commit 365d72d

Browse files
authored
DOC: tweak the readme (#129)
1 parent 27b6521 commit 365d72d

File tree

1 file changed

+11
-16
lines changed

1 file changed

+11
-16
lines changed

README.md

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -78,8 +78,11 @@ $ pytest --pyargs scpdt
7878

7979
## Usage
8080

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.
8386

8487

8588
### Basic usage
@@ -100,7 +103,7 @@ For more details, see the `testmod` docstring. Other useful functions are
100103
`find_doctests`, `run_docstring_examples` and `testfile` (the latter two mimic
101104
the behavior of the eponymous functions of the `doctest` module).
102105

103-
### Command-line interface
106+
#### Command-line interface
104107

105108
There is a basic CLI, which also mimics that of the `doctest` module:
106109
```
@@ -116,7 +119,7 @@ $ python -m scpdt bar.rst
116119
```
117120

118121

119-
### More fine-grained control
122+
#### More fine-grained control
120123

121124
More fine-grained control of the functionality is available via the following
122125
classes
@@ -136,7 +139,7 @@ passing the instance to `testmod` or constructors of `DT*` objects. Defaults
136139
are provided, based on a long-term usage in SciPy.
137140

138141

139-
## The Scpdt Pytest Plugin
142+
### The Scpdt Pytest Plugin
140143

141144
The pytest plugin enables the use of scpdt tools to perform doctests.
142145

@@ -171,13 +174,6 @@ To run doctests on specific SciPy modules, e.g: `cluster`, use the following com
171174
python dev.py test --doctests -s cluster
172175
```
173176

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-
181177
### Running Doctests on Other Packages/Projects
182178

183179
If you want to run doctests on packages or projects other than SciPy, follow these steps:
@@ -278,10 +274,9 @@ Happy testing!
278274
some maintenance work may be required to adapt when `pytest` publishes a new
279275
release.
280276

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`.
285280

286281
- `NumPy` and `SciPy` use modified doctesting in their `refguide-check` utilities.
287282
These utilities are tightly coupled to their libraries, and have been reported

0 commit comments

Comments
 (0)