Doctest plugin for pytest with support for Sphinx-specific doctest-directives
Project description
A doctest plugin for pytest, which understands the sphinx-specific directives from doctest-sphinx. Those sphinx-specific directives can be used in rst files as well as in docstrings of python modules.
Features
support for the doctest directive
support for testcode and testoutput directives
support for testsetup and testcleanup is planned (pull-requests welcome)
support for parsing global optionflags (doctest_optionflags) from pytest.ini
support for :options: in testoutput
support for :skipif: in testcode and in testoutput
:hide: is ignored by “pytest-sphinx”
Requirements
pytest
Installation
You can install “pytest-sphinx” via pip from PyPI:
$ pip install pytest-sphinx
Usage
See doctest-sphinx. Have a look at the examples in doctest-examples.
Run pytest with the –doctest-modules flag.
Contributing
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.
License
Distributed under the terms of the BSD-3 license, “pytest-sphinx” is free and open source software
Issues
If you encounter any problems, please file an issue along with a detailed description.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pytest_sphinx-0.7.1.tar.gz.
File metadata
- Download URL: pytest_sphinx-0.7.1.tar.gz
- Upload date:
- Size: 13.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bdf45d96458e6aa1f3618c4845e60924eaa91244247c527eb88f58d6685dece6
|
|
| MD5 |
8e3d425a2fcd5b8e5ddc423a1f810bdf
|
|
| BLAKE2b-256 |
6c813c7e79f46228bbabdc836b3d2ef4adaa32559501055fdb02d40e4a6e7452
|
Provenance
The following attestation bundles were made for pytest_sphinx-0.7.1.tar.gz:
Publisher:
publish-to-pypi.yml on twmr/pytest-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_sphinx-0.7.1.tar.gz -
Subject digest:
bdf45d96458e6aa1f3618c4845e60924eaa91244247c527eb88f58d6685dece6 - Sigstore transparency entry: 843806872
- Sigstore integration time:
-
Permalink:
twmr/pytest-sphinx@f470f83ebd9d94ed0213f8744e9ac23b57a1eadb -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/twmr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f470f83ebd9d94ed0213f8744e9ac23b57a1eadb -
Trigger Event:
push
-
Statement type:
File details
Details for the file pytest_sphinx-0.7.1-py3-none-any.whl.
File metadata
- Download URL: pytest_sphinx-0.7.1-py3-none-any.whl
- Upload date:
- Size: 10.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fa943bb22c15569db02367b5b2b13ef3fbb9e534931ec193d480c05d956979fb
|
|
| MD5 |
0231110d2d6d7c9e6d8cecf8447c72ef
|
|
| BLAKE2b-256 |
dfeefc942ac27ad00ac71a5f5b1c8929bd49ff632d2c3dd30f07b552280bd4c8
|
Provenance
The following attestation bundles were made for pytest_sphinx-0.7.1-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on twmr/pytest-sphinx
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pytest_sphinx-0.7.1-py3-none-any.whl -
Subject digest:
fa943bb22c15569db02367b5b2b13ef3fbb9e534931ec193d480c05d956979fb - Sigstore transparency entry: 843806902
- Sigstore integration time:
-
Permalink:
twmr/pytest-sphinx@f470f83ebd9d94ed0213f8744e9ac23b57a1eadb -
Branch / Tag:
refs/tags/v0.7.1 - Owner: https://github.com/twmr
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@f470f83ebd9d94ed0213f8744e9ac23b57a1eadb -
Trigger Event:
push
-
Statement type: