Skip to content

Commit a01f06e

Browse files
committed
clarify the new APIs that support golden value tests
1 parent 21686cf commit a01f06e

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

peps/pep-08XX.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,21 @@ Traceback Module Updates
163163
keyword argument (default ``False``) that suppresses timestamp display even
164164
when globally enabled.
165165

166+
A new utility function ``traceback.strip_exc_timestamps(text)`` is provided
167+
to strip ``<@...>`` timestamp suffixes from formatted traceback strings.
168+
This is useful for anything that compares traceback output literally.
169+
170+
Doctest Updates
171+
---------------
172+
173+
A new ``doctest.IGNORE_EXCEPTION_TIMESTAMPS`` option flag is added. When
174+
enabled, the doctest output checker strips timestamps from actual output before
175+
comparison, so that doctests producing exceptions pass regardless of whether
176+
timestamps are enabled.
177+
178+
Third-party projects are **not** expected to support running their tests with
179+
timestamps enabled, and we do not expect many projects would ever want to.
180+
166181

167182
Backwards Compatibility
168183
=======================

0 commit comments

Comments
 (0)