Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog/13547.contrib.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Self-testing: corrected expected message for ``test_doctest_unexpected_exception`` in Python ``3.14``.
9 changes: 6 additions & 3 deletions testing/test_doctest.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,12 @@ def test_doctest_unexpected_exception(self, pytester: Pytester):
"002 >>> 0 / i",
"UNEXPECTED EXCEPTION: ZeroDivisionError*",
"Traceback (most recent call last):",
' File "*/doctest.py", line *, in __run',
" *",
*((" *^^^^*", " *", " *") if sys.version_info >= (3, 13) else ()),
*(
(' File "*/doctest.py", line *, in __run', " *")
if sys.version_info <= (3, 14)
else ()
),
*((" *^^^^*", " *", " *") if sys.version_info[:2] == (3, 13) else ()),
' File "<doctest test_doctest_unexpected_exception.txt[1]>", line 1, in <module>',
"ZeroDivisionError: division by zero",
"*/test_doctest_unexpected_exception.txt:2: UnexpectedException",
Expand Down