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.6.3.tar.gz (13.7 kB view details)

Uploaded Source

Built Distribution

pytest_sphinx-0.6.3-py3-none-any.whl (10.3 kB view details)

Uploaded Python 3

File details

Details for the file pytest_sphinx-0.6.3.tar.gz.

File metadata

  • Download URL: pytest_sphinx-0.6.3.tar.gz
  • Upload date:
  • Size: 13.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.10.12

File hashes

Hashes for pytest_sphinx-0.6.3.tar.gz
Algorithm Hash digest
SHA256 3b63c8181b9de6a5e5c9826d1b4dc0c827245bec8e64c9f16f269be08be5ecd5
MD5 0839b97a1f0c3c3e49cbaeef4d2edfa7
BLAKE2b-256 8f12a6e99712955b7057accbe43f7f709cf212e6fc00f570bfdc93574335ba5b

See more details on using hashes here.

File details

Details for the file pytest_sphinx-0.6.3-py3-none-any.whl.

File metadata

File hashes

Hashes for pytest_sphinx-0.6.3-py3-none-any.whl
Algorithm Hash digest
SHA256 856e760e64dfbfc89e362e187d641140a267b97881d3ef8aeefb72cc8438ac40
MD5 352c033e7e657e4e0c8f07f53c10644a
BLAKE2b-256 70db79570f7eebfa0f24b670d985423f4fa45fee67ef8feb25c6b58cbe2b0bb7

See more details on using hashes here.

Supported by

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