diff options
author | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
---|---|---|
committer | Collin Winter <collinw@gmail.com> | 2007-08-29 23:37:32 (GMT) |
commit | 3add4d78ff9f5de02e2c0de09efe9a9b5317539f (patch) | |
tree | c61c6a122b33537814bcc643300f10759fa81010 /Lib/test/test_doctest.py | |
parent | e0281cab810c30a23cf2490704e0f85aa4751e83 (diff) | |
download | cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.zip cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.gz cpython-3add4d78ff9f5de02e2c0de09efe9a9b5317539f.tar.bz2 |
Raise statement normalization in Lib/test/.
Diffstat (limited to 'Lib/test/test_doctest.py')
-rw-r--r-- | Lib/test/test_doctest.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index 718f7b2..ab0e1d0 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -811,7 +811,7 @@ Exception messages may contain newlines: >>> def f(x): ... r''' - ... >>> raise ValueError, 'multi\nline\nmessage' + ... >>> raise ValueError('multi\nline\nmessage') ... Traceback (most recent call last): ... ValueError: multi ... line @@ -826,7 +826,7 @@ message is raised, then it is reported as a failure: >>> def f(x): ... r''' - ... >>> raise ValueError, 'message' + ... >>> raise ValueError('message') ... Traceback (most recent call last): ... ValueError: wrong message ... ''' @@ -836,7 +836,7 @@ message is raised, then it is reported as a failure: ********************************************************************** File ..., line 3, in f Failed example: - raise ValueError, 'message' + raise ValueError('message') Expected: Traceback (most recent call last): ValueError: wrong message @@ -851,7 +851,7 @@ detail: >>> def f(x): ... r''' - ... >>> raise ValueError, 'message' #doctest: +IGNORE_EXCEPTION_DETAIL + ... >>> raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL ... Traceback (most recent call last): ... ValueError: wrong message ... ''' @@ -863,7 +863,7 @@ But IGNORE_EXCEPTION_DETAIL does not allow a mismatch in the exception type: >>> def f(x): ... r''' - ... >>> raise ValueError, 'message' #doctest: +IGNORE_EXCEPTION_DETAIL + ... >>> raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL ... Traceback (most recent call last): ... TypeError: wrong type ... ''' @@ -873,7 +873,7 @@ But IGNORE_EXCEPTION_DETAIL does not allow a mismatch in the exception type: ********************************************************************** File ..., line 3, in f Failed example: - raise ValueError, 'message' #doctest: +IGNORE_EXCEPTION_DETAIL + raise ValueError('message') #doctest: +IGNORE_EXCEPTION_DETAIL Expected: Traceback (most recent call last): TypeError: wrong type |