Skip to content

Commit

Permalink
Update test_sphinxify_docstring for Python 3.13
Browse files Browse the repository at this point in the history
  • Loading branch information
domdfcoding committed Dec 11, 2023
1 parent 3e565be commit ea7273a
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion tests/test_doctools.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

# stdlib
import math
import sys
from typing import Iterable, NamedTuple, get_type_hints

# 3rd party
Expand Down Expand Up @@ -353,7 +354,16 @@ def demo_function():

return math.pi

assert demo_function.__doc__ == """
if sys.version_info >= (3, 13):
assert demo_function.__doc__ == """
This is a docstring that contains references to :class:`str`, :class:`int`, and :class:`float`
but lacks proper references to them when rendered in Sphinx.
:return: pi
:rtype: float
"""
else:
assert demo_function.__doc__ == """
This is a docstring that contains references to :class:`str`, :class:`int`, and :class:`float`
but lacks proper references to them when rendered in Sphinx.
Expand Down

0 comments on commit ea7273a

Please sign in to comment.