[Python-checkins] cpython (2.7): Fudge - http.client doesn't exist in 2.7. Use Queue.Empty instead.
tim.peters
python-checkins at python.org
Wed Dec 4 04:49:44 CET 2013
http://hg.python.org/cpython/rev/ae9fb85ab4e0
changeset: 87754:ae9fb85ab4e0
branch: 2.7
parent: 87751:5e14a3435f52
user: Tim Peters <tim at python.org>
date: Tue Dec 03 21:49:30 2013 -0600
summary:
Fudge - http.client doesn't exist in 2.7. Use Queue.Empty instead.
files:
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
--- a/Lib/test/test_doctest.py
+++ b/Lib/test/test_doctest.py
@@ -1024,10 +1024,10 @@
>>> 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 @@
>>> 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)
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list