]> granicus.if.org Git - python/commitdiff
Change doctest exception example to one whose detail hasn't changed since 1.5.2.
authorTim Peters <tim.peters@gmail.com>
Wed, 14 Feb 2001 00:43:21 +0000 (00:43 +0000)
committerTim Peters <tim.peters@gmail.com>
Wed, 14 Feb 2001 00:43:21 +0000 (00:43 +0000)
Lib/doctest.py
Lib/test/output/test_doctest

index b761676fa3f55983ac59bae5e6afa8b8c5000572..b3ef98b879ee5a8ca80c8b128f6915203a519e8c 100644 (file)
@@ -159,10 +159,10 @@ WHAT ABOUT EXCEPTIONS?
 No problem, as long as the only output generated by the example is the
 traceback itself.  For example:
 
-    >>> 1/0
+    >>> [1, 2, 3].remove(42)
     Traceback (most recent call last):
       File "<stdin>", line 1, in ?
-    ZeroDivisionError: integer division or modulo by zero
+    ValueError: list.remove(x): x not in list
     >>>
 
 Note that only the exception type and value are compared (specifically,
@@ -244,11 +244,11 @@ If you execute this very file, the examples above will be found and
 executed, leading to this output in verbose mode:
 
 Running doctest.__doc__
-Trying: 1/0
+Trying: [1, 2, 3].remove(42)
 Expecting:
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
-ZeroDivisionError: integer division or modulo by zero
+ValueError: list.remove(x): x not in list
 ok
 Trying: x = 12
 Expecting: nothing
index 78f7a20ebd7950877ff58b029e627b7a7d06ab11..e2b13943a85b7483d184f5fa8a8a89151f963106 100644 (file)
@@ -1,10 +1,10 @@
 test_doctest
 Running doctest.__doc__
-Trying: 1/0
+Trying: [1, 2, 3].remove(42)
 Expecting:
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
-ZeroDivisionError: integer division or modulo by zero
+ValueError: list.remove(x): x not in list
 ok
 Trying: x = 12
 Expecting: nothing