Commits

Nick Coghlan committed db55167

Backport a fix from Py3k for a potentially misleading example

  • Participants
  • Parent commits 41ed58e
  • Branches legacy-trunk

Comments (0)

Files changed (1)

File Doc/library/doctest.rst

    both these variations will work regardless of whether the test is run under
    Python 2.7 or Python 3.2 (or later versions):
 
-      >>> raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL
+      >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL
       Traceback (most recent call last):
-      ValueError: message
-
-      >>> raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL
+      CustomError: message
+
+      >>> raise CustomError('message') #doctest: +IGNORE_EXCEPTION_DETAIL
       Traceback (most recent call last):
-      builtin.ValueError: message
+      my_module.CustomError: message
 
    Note that :const:`ELLIPSIS` can also be used to ignore the
    details of the exception message, but such a test may still fail based