Skip to main content

Doctest plugin for pytest with support for Sphinx-specific doctest-directives

Project description

Action Status

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

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pytest_sphinx-0.7.1.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pytest_sphinx-0.7.1-py3-none-any.whl (10.1 kB view details)

Uploaded Python 3

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

Hashes for pytest_sphinx-0.7.1.tar.gz
Algorithm Hash digest
SHA256 bdf45d96458e6aa1f3618c4845e60924eaa91244247c527eb88f58d6685dece6
MD5 8e3d425a2fcd5b8e5ddc423a1f810bdf
BLAKE2b-256 6c813c7e79f46228bbabdc836b3d2ef4adaa32559501055fdb02d40e4a6e7452

See more details on using hashes here.

Provenance

The following attestation bundles were made for pytest_sphinx-0.7.1.tar.gz:

Publisher: publish-to-pypi.yml on twmr/pytest-sphinx

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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

Hashes for pytest_sphinx-0.7.1-py3-none-any.whl
Algorithm Hash digest
SHA256 fa943bb22c15569db02367b5b2b13ef3fbb9e534931ec193d480c05d956979fb
MD5 0231110d2d6d7c9e6d8cecf8447c72ef
BLAKE2b-256 dfeefc942ac27ad00ac71a5f5b1c8929bd49ff632d2c3dd30f07b552280bd4c8

See more details on using hashes here.

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

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page