Skip to content

Commit 4a4c17c

Browse files
committed
In tests handle docstrings being dedented on Python 3.13
1 parent 7560389 commit 4a4c17c

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

tests/test_core.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,5 +57,11 @@ def test_get_sphinx_doc_url_wrapping():
5757
assert get_type_hints(get_sphinx_doc_url) == {"pypi_name": str, "return": str}
5858

5959
assert get_sphinx_doc_url.__defaults__ is None
60-
assert get_sphinx_doc_url.__doc__.startswith("\n Returns the URL to the given project's Sphinx documentation.")
60+
if sys.version_info >= (3, 13):
61+
start_string = "\nReturns the URL to the given project's Sphinx documentation."
62+
else:
63+
start_string = "\n Returns the URL to the given project's Sphinx documentation."
64+
65+
assert get_sphinx_doc_url.__doc__.startswith(start_string)
66+
6167
assert get_sphinx_doc_url.__wrapped__

0 commit comments

Comments
 (0)