pytest-doctestplus
pytest-doctestplus copied to clipboard
Pytest plugin providing advanced doctest features
This follows gh-220. After gh-221 it is documented that a markdown block needs to end with a blank line before the backticks like: ``````markdown ``` >>> 1 + 1 2...
We've started using doctestplus in scikit-image and I'm happy with it so far. However, my main gripe with it is that (conditional) skipping doctest isn't very visible. E.g. when I...
We (over at https://github.com/nipy/nipy) have a customized doctest `OutputChecker` class for a few new directives - https://github.com/matthew-brett/nipy/blob/pytest/nipy/conftest.py#L152 I have tried to apply this output checker by monkey-patching `doctest` in `conftest.py`:...
[Edit by @bsipocz]: This seems to be a generic issue, not just with the specific directives below. Most recently we run into the issue with using `doctest-remote-data::` along with `plot::`...
- [ ] Revert #211 Example log: https://github.com/scientific-python/pytest-doctestplus/actions/runs/5704149430/job/15457469475 ``` ____________________________ [doctest] module2.foo _____________________________ EXAMPLE LOCATION UNKNOWN, not showing all tests of that example ??? >>> foo(1, 2) Expected: 3.0 Got:...
Example: https://github.com/astropy/pytest-doctestplus/blob/e1eea63ebbdb36ef759c5c90e9ccd40d1a289d55/tests/test_doctestplus.py#L15 It is legacy now and has been replaced by `pytester`. Blocked by: * Need to bump minversion of pytest to 6.2 or later.
Moved from astropy/astropy#3948 . Originally posted by @bsipocz on July 12, 2015. Is there a way to enable the directive to work in the docstrings, too? It works fine in...
It would be nice to be able to specify patterns for lines to ignore - e.g. in the following case the Downloading line can be ignored: ``` 233 >>> from...
As noted originally in https://github.com/astropy/astropy/issues/6554, numpy was thinking about their own version of something like `FLOAT_CMP` and ended up adapting scipy's `refguide` [1] for its docstring testing. It includes float...
I went through the issue tracker and I think this exact issue has not been discussed yet: It looks like the current support for conditional skipping is limited to checking...