Doctests on steroids
This pytest plugin was generated with Cookiecutter along with @hackebrot's cookiecutter-pytest-plugin template.
Note This is a proof-of-concept experiment, likely to be postponed or abandoned in favor of https://github.com/ev-br/scpdt
Clone the repo and pip install it:
$ pip install .
Test-drive:
$ cd tests
$ pytest -pno:doctest --doctest-modules mod.py -v -s
Here mod.py
is simply:
def func():
"""
>>> 2 / 3
0.667
"""
pass
Note that the doctest passes, even though it fails with the vanilla doctest module.
- TODO
You can install "pytest-scipydoctest" via pip from PyPI:
$ pip install pytest-scipydoctest
- TODO
Contributions are very welcome. Tests can be run with tox, please ensure the coverage at least stays the same before you submit a pull request.
Distributed under the terms of the BSD-3 license, "pytest-scipydoctest" is free and open source software
If you encounter any problems, please file an issue along with a detailed description.