From: Tim Peters Date: Wed, 4 Dec 2013 03:49:30 +0000 (-0600) Subject: Fudge - http.client doesn't exist in 2.7. Use Queue.Empty instead. X-Git-Tag: v2.7.8~221 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c289fa75564872d33e5911e0b44e657ae9e7fbcc;p=thirdparty%2FPython%2Fcpython.git Fudge - http.client doesn't exist in 2.7. Use Queue.Empty instead. --- diff --git a/Lib/test/test_doctest.py b/Lib/test/test_doctest.py index c9de18897975..a58c4ae7a709 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)