You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
To tailor your doctesting experience, you can utilize an instance of `DTConfig`.
169
-
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/ev-br/scpdt#tailoring-your-doctesting-experience) section.
168
+
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/scipy/scipy_doctest#tailoring-your-doctesting-experience) section.
170
169
171
170
3.**Run Doctests**
172
171
173
172
Doctesting is configured to execute on SciPy using the `dev.py` module.
174
173
175
174
To run all doctests, use the following command:
176
175
```bash
177
-
python dev.py test --doctests
176
+
python dev.py smoke-docs
178
177
```
179
178
180
179
To run doctests on specific SciPy modules, e.g: `cluster`, use the following command:
181
180
182
181
```bash
183
-
python dev.py test --doctests -s cluster
182
+
python dev.py smoke-docs -s cluster
184
183
```
185
184
186
185
### Running Doctests on Other Packages/Projects
@@ -190,7 +189,7 @@ If you want to run doctests on packages or projects other than SciPy, follow the
@@ -202,14 +201,14 @@ To do this, add the following line of code:
202
201
```python
203
202
# In your conftest.py file or test module
204
203
205
-
pytest_plugins ="scpdt"
204
+
pytest_plugins ="scipy_doctest"
206
205
```
207
206
208
207
Check out the [pytest documentation](https://docs.pytest.org/en/stable/how-to/writing_plugins.html#requiring-loading-plugins-in-a-test-module-or-conftest-file) for more information on requiring/loading plugins in a test module or `conftest.py` file.
209
208
210
209
3.**Configure your doctesting experience**
211
210
212
-
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/ev-br/scpdt#tailoring-your-doctesting-experience) section.
211
+
An in-depth explanation is given in the [tailoring your doctesting experience](https://github.com/scipy/scipy_doctest#tailoring-your-doctesting-experience) section.
[DTConfig](https://github.com/ev-br/scpdt/blob/671083d65b54111770cee71c9bc790ac652d59ab/scpdt/impl.py#L16) offers a variety of attributes that allow you to fine-tune your doctesting experience.
234
+
[DTConfig](https://github.com/scipy/scipy_doctest/blob/main/scipy_doctest/impl.py#L23) offers a variety of attributes that allow you to fine-tune your doctesting experience.
236
235
237
236
These attributes include:
238
237
1.**default_namespace (dict):** Defines the namespace in which examples are executed.
@@ -252,16 +251,16 @@ Typically, it is entered for each DocTest (especially in API documentation), ens
252
251
12.**nameerror_after_exception (bool):** Controls whether subsequent examples in the same test, after one has failed, may raise spurious NameErrors. Set to `True` if you want to observe these errors or if your test is expected to raise NameErrors. The default is `False`.
253
252
254
253
To set any of these attributes, create an instance of `DTConfig` called `dt_config`.
255
-
This instance is already set as an [attribute of pytest's `Config` object](https://github.com/ev-br/scpdt/blob/671083d65b54111770cee71c9bc790ac652d59ab/scpdt/plugin.py#L27).
254
+
This instance is already set as an [attribute of pytest's `Config` object](https://github.com/scipy/scipy_doctest/blob/58ff06a837b7bff1dbac6560013fc6fd07952ae2/scipy_doctest/plugin.py#L39).
If you don't set these attributes, the [default settings](https://github.com/ev-br/scpdt/blob/671083d65b54111770cee71c9bc790ac652d59ab/scpdt/impl.py#L73) of the attributes are used.
272
+
If you don't set these attributes, the [default settings](https://github.com/scipy/scipy_doctest/blob/58ff06a837b7bff1dbac6560013fc6fd07952ae2/scipy_doctest/impl.py#L94) of the attributes are used.
274
273
275
-
By following these steps, you will be able to effectively use the Scpdt pytest plugin for doctests in your Python projects.
274
+
By following these steps, you will be able to effectively use the SciPy Doctest pytest plugin for doctests in your Python projects.
276
275
277
276
Happy testing!
278
277
@@ -299,7 +298,7 @@ instead of `$ pytest --pyargs scipy`.
299
298
If push comes to shove, you may try using the magic env variable:
300
299
` PY_IGNORE_IMPORTMISMATCH=1 pytest ...`,
301
300
however the need usually indicates an issue with the package itself.
302
-
(see [gh-107](https://github.com/ev-br/scpdt/pull/107) for an example).
301
+
(see [gh-107](https://github.com/scipy/scipy_doctest/pull/107) for an example).
0 commit comments