Skip to content

twmr/pytest-sphinx

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

f532f2c · Jan 28, 2024
Jan 28, 2024
Sep 8, 2022
Sep 8, 2022
Apr 27, 2020
Jul 12, 2022
May 14, 2022
May 14, 2022
Sep 6, 2022
Jul 25, 2017
Jul 15, 2022
Sep 8, 2022
Sep 4, 2022
Sep 4, 2022

Repository files navigation

pytest-sphinx

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.