8000 Update test_sphinxify_docstring for Python 3.13 · domdfcoding/domdf_python_tools@ea7273a · GitHub
[go: up one dir, main page]

Skip to content

Commit ea7273a

Browse files
committed
Update test_sphinxify_docstring for Python 3.13
1 parent 3e565be commit ea7273a

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

tests/test_doctools.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88

99
# stdlib
1010
import math
11+
import sys
1112
from typing import Iterable, NamedTuple, get_type_hints
1213

1314
# 3rd party
@@ -353,7 +354,16 @@ def demo_function():
353354

354355
return math.pi
355356

356-
assert demo_function.__doc__ == """
357+
if sys.version_info >= (3, 13):
358+
assert demo_function.__doc__ == """
359+
This is a docstring that contains references to :class:`str`, :class:`int`, and :class:`float`
360+
but lacks proper references to them when rendered in Sphinx.
361+
362+
:return: pi
363+
:rtype: float
364+
"""
365+
else:
366+
assert demo_function.__doc__ == """
357367
This is a docstring that contains references to :class:`str`, :class:`int`, and :class:`float`
358368
but lacks proper references to them when rendered in Sphinx.
359369

0 commit comments

Comments
 (0)
0