Metadata-Version: 2.1
Name: pytest-sphinx
Version: 0.5.0
Summary: Doctest plugin for pytest with support for Sphinx-specific doctest-directives
Author-email: Thomas Hisch <t.hisch@gmail.com>
Maintainer-email: Thomas Hisch <t.hisch@gmail.com>
License: 
        Copyright (c) 2017, Thomas Hisch
        All rights reserved.
        
        Redistribution and use in source and binary forms, with or without
        modification, are permitted provided that the following conditions are met:
        
        * Redistributions of source code must retain the above copyright notice, this
          list of conditions and the following disclaimer.
        
        * Redistributions in binary form must reproduce the above copyright notice,
          this list of conditions and the following disclaimer in the documentation
          and/or other materials provided with the distribution.
        
        * Neither the name of pytest-sphinx nor the names of its
          contributors may be used to endorse or promote products derived from
          this software without specific prior written permission.
        
        THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
        AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
        IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
        DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
        FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
        DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
        SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
        CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
        OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
        OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
        
Project-URL: homepage, https://github.com/thisch/pytest-sphinx
Keywords: sphinx,pytest,rst
Classifier: Development Status :: 4 - Beta
Classifier: Framework :: Pytest
Classifier: Intended Audience :: Developers
Classifier: Topic :: Software Development :: Testing
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3.8
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: Implementation :: CPython
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: BSD License
Requires-Python: >=3.7
Description-Content-Type: text/x-rst
Provides-Extra: lint
License-File: LICENSE

=============
pytest-sphinx
=============

.. image:: https://github.com/thisch/pytest-sphinx/workflows/Test/badge.svg
    :target: https://github.com/thisch/pytest-sphinx/actions
    :alt: 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
-----

* 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.

.. _`doctest-sphinx`: http://www.sphinx-doc.org/en/stable/ext/doctest.html
.. _`doctest-examples`: https://github.com/sphinx-doc/sphinx/blob/master/tests/roots/test-ext-doctest/doctest.txt
.. _`@hackebrot`: https://github.com/hackebrot
.. _`MIT`: http://opensource.org/licenses/MIT
.. _`BSD-3`: http://opensource.org/licenses/BSD-3-Clause
.. _`GNU GPL v3.0`: http://www.gnu.org/licenses/gpl-3.0.txt
.. _`Apache Software License 2.0`: http://www.apache.org/licenses/LICENSE-2.0
.. _`file an issue`: https://github.com/thisch/pytest-sphinx/issues
.. _`pytest`: https://github.com/pytest-dev/pytest
.. _`tox`: https://tox.readthedocs.io/en/latest/
.. _`pip`: https://pypi.python.org/pypi/pip/
.. _`PyPI`: https://pypi.python.org/pypi
