diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-02-14 00:43:21 (GMT) |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-02-14 00:43:21 (GMT) |
commit | 60e23f4cfc306ae827bb0d00f13f2a51e244b235 (patch) | |
tree | a0e55810c934e2c9e40dafa3b2029d5ddb0a736e /Lib/doctest.py | |
parent | 0eea16633adab90227826c3dc96b991829665012 (diff) | |
download | cpython-60e23f4cfc306ae827bb0d00f13f2a51e244b235.zip cpython-60e23f4cfc306ae827bb0d00f13f2a51e244b235.tar.gz cpython-60e23f4cfc306ae827bb0d00f13f2a51e244b235.tar.bz2 |
Change doctest exception example to one whose detail hasn't changed since 1.5.2.
Diffstat (limited to 'Lib/doctest.py')
-rw-r--r-- | Lib/doctest.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/doctest.py b/Lib/doctest.py index b761676..b3ef98b 100644 --- a/Lib/doctest.py +++ b/Lib/doctest.py @@ -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 |