Skip to content

Commit

Permalink
DOC: Version check is supported
Browse files Browse the repository at this point in the history
in the directive since v0.5
  • Loading branch information
pllim committed May 10, 2023
1 parent 29cbdaa commit ec809a0
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 ec809a0

Please sign in to comment.