File tree Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Expand file tree Collapse file tree 2 files changed +24
-1
lines changed Original file line number Diff line number Diff line change 11# Changelog
22
3+ ## 2.0 (2025-08-05)
4+
5+ - The default for the CLI option ` --doctest-only-doctests ` is changed to ` False ` .
6+ ** This is a breaking change.** From now on, the default behavior of
7+ ` $ pytest --doctest-modules ` is to collect both doctests and unit tests, which aligns
8+ with the rest of the ecosystem. To retain the previous behavior of only collecting
9+ doctests, use ` $ pytest --doctest-modules --doctest-only-doctests=true ` explicitly.
10+ See [ gh-198 ] ( https://github.com/scipy/scipy_doctest/issues/198 ) for details.
11+
12+ - A new ` pytest_extra_requires ` key was added to ` DTConfig ` . This allows to express
13+ dependencies of individual functions or modules, and only collect doctests if
14+ the specified requirements are met. As a made-up example,
15+
16+ ```
17+ config = DTConfig()
18+ config.pytest_extra_requires ={"full.func.name" : ["cupy", "numpy>2"]}
19+ ```
20+
21+ will only collect doctests from the docstring of ` full.func.name ` if ` cupy ` is available,
22+ and if ` numpy ` is at version ` 2.0 ` or above.
23+ Parsing requirements relies on the [ ` packaging ` module from PyPA] ( https://github.com/pypa/packaging ) .
24+
25+
326## 1.8 (2025-05-29)
427
528- Add a CLI option, ` --doctest-only-doctests={true,false} ` to control whether to only
Original file line number Diff line number Diff line change 33"""
44
55
6- __version__ = "1.9.0.dev0 "
6+ __version__ = "2.0.0 "
77
88try :
99 # register internal modules with pytest; obscure errors galore otherwise
You can’t perform that action at this time.
0 commit comments