Skip to content

Commit

Permalink
Merge pull request #198 from pllim/update-doc
Browse files Browse the repository at this point in the history
DOC: Version check is supported in the doctest-requires directive since v0.5
  • Loading branch information
saimn authored May 18, 2023
2 parents 29cbdaa + ec809a0 commit b1b2d5f
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -288,6 +288,16 @@ conditionally skipped if a dependency is not available.
>>> import asdf
>>> asdf.open('file.asdf')
Furthermore, if the code only runs for specific versions of the optional dependency,
you can add a version check like this::

.. code-block:: rst
.. doctest-requires:: asdf<3
>>> import asdf
>>> asdf.open('file.asdf')
Finally, it is possible to skip collecting doctests in entire subpackages by
using the ``doctest_subpackage_requires`` in the ``[tool:pytest]`` section of
the package's ``setup.cfg`` file. The syntax for this option is a list of
Expand Down

0 comments on commit b1b2d5f

Please sign in to comment.