Skip to content
This repository has been archived by the owner on Jan 30, 2023. It is now read-only.

Commit

Permalink
Add documentation for test:pytest
Browse files Browse the repository at this point in the history
  • Loading branch information
tobiasdiez committed Mar 20, 2022
1 parent 9c5d5a9 commit 0c7bf17
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/doc/en/developer/coding_basics.rst
Original file line number Diff line number Diff line change
Expand Up @@ -509,6 +509,12 @@ information. You can use the existing functions of Sage as templates.
However, lines only containing double colons `::` do not
end "TESTS" blocks.

Sometimes (but rarely) one has private or protected methods that don't need a
proper ``EXAMPLES`` doctest. In these cases, one can either write traditional
doctest using the ``TESTS`` block or use pytest to test the method.
In the latter case, one has to add ``TESTS: pytest`` to the docstring, so that
the method is explicitly marked as tested.

Note about Sphinx directives vs. other blocks
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Expand Down

0 comments on commit 0c7bf17

Please sign in to comment.