diff options
author | Tim Peters <tim@python.org> | 2013-12-04 03:49:30 (GMT) |
---|---|---|
committer | Tim Peters <tim@python.org> | 2013-12-04 03:49:30 (GMT) |
commit | c289fa75564872d33e5911e0b44e657ae9e7fbcc (patch) | |
tree | a9b9befb4fa36019cb9b6d7c8963beca758a07b1 | |
parent | 0ee9baa8d43a95d8981d00f09b6abd26aea32e52 (diff) | |
download | cpython-c289fa75564872d33e5911e0b44e657ae9e7fbcc.zip cpython-c289fa75564872d33e5911e0b44e657ae9e7fbcc.tar.gz cpython-c289fa75564872d33e5911e0b44e657ae9e7fbcc.tar.bz2 |
Fudge - http.client doesn't exist in 2.7. Use Queue.Empty instead.
-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 c9de188..a58c4ae 100644 --- a/Lib/test/test_doctest.py +++ b/Lib/test/test_doctest.py @@ -1024,10 +1024,10 @@ IGNORE_EXCEPTION_DETAIL to normalize the modules between Python 2 and 3: >>> def f(x): ... r''' - ... >>> from http.client import HTTPException - ... >>> raise HTTPException() #doctest: +IGNORE_EXCEPTION_DETAIL + ... >>> from Queue import Empty + ... >>> raise Empty() #doctest: +IGNORE_EXCEPTION_DETAIL ... Traceback (most recent call last): - ... foo.bar.HTTPException + ... foo.bar.Empty ... ''' >>> test = doctest.DocTestFinder().find(f)[0] >>> doctest.DocTestRunner(verbose=False).run(test) @@ -1037,10 +1037,10 @@ Note that a trailing colon doesn't matter either: >>> def f(x): ... r''' - ... >>> from http.client import HTTPException - ... >>> raise HTTPException() #doctest: +IGNORE_EXCEPTION_DETAIL + ... >>> from Queue import Empty + ... >>> raise Empty() #doctest: +IGNORE_EXCEPTION_DETAIL ... Traceback (most recent call last): - ... foo.bar.HTTPException: + ... foo.bar.Empty: ... ''' >>> test = doctest.DocTestFinder().find(f)[0] >>> doctest.DocTestRunner(verbose=False).run(test) |