summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_urllib2net.py
Commit message (Collapse)AuthorAgeFilesLines
* Fix Issue8460: Victor's patch to add timeout in test_urllib2net test_urls.Senthil Kumaran2010-04-201-4/+16
|
* Issue #8348: Fix test ftp url in test_urllib2net.Martin v. Löwis2010-04-081-1/+1
|
* Remove unused imports in test modules.Georg Brandl2010-02-071-4/+1
|
* use assert[Not]IsInstance where appropriateEzio Melotti2010-01-241-1/+1
|
* convert usage of fail* to assert*Benjamin Peterson2009-06-301-6/+6
|
* Issue #5341: Fix a variety of spelling errors.Mark Dickinson2009-02-211-1/+1
|
* Finished bug #2451. Fixed the retrying part to make itFacundo Batista2008-06-071-8/+16
| | | | more robust.
* Fixed the semantic of timeout for socket.create_connection andFacundo Batista2008-05-291-17/+29
| | | | | | all the upper level libraries that use it, including urllib2. Added and fixed some tests, and changed docs correspondingly. Thanks to John J Lee for the patch and the pusing, :)
* This patch moves some tests from test_urllib2_net to test_urllib2_localnet.Gregory P. Smith2008-03-281-96/+2
| | | | | | | | The moved tests use a local server rather than going out to external servers. Accepts patch from issue2429. Contributed by Jerry Seutter & Michael Foord (fuzzyman) at PyCon 2008.
* Make the test more robust by trying to reconnect up to 3 timesNeal Norwitz2008-01-251-19/+35
| | | | | | | in case there were transient failures. This will hopefully silence the buildbots for this test. As we find other tests that have a problem, we can fix with a similar strategy assuming it is successful. It worked on my box in a loop for 10+ runs where it would have an exception otherwise.
* Change socket.error to inherit from IOError rather than being a standGregory P. Smith2007-09-091-9/+7
| | | | | | | | | | | | | | | | | | | | | | alone class. This addresses the primary concern in http://bugs.python.org/issue1706815 python-dev discussion here: http://mail.python.org/pipermail/python-dev/2007-July/073749.html I chose IOError rather than EnvironmentError as the base class since socket objects are often used as transparent duck typed file objects in code already prepared to deal with IOError exceptions. also a minor fix: urllib2 - fix a couple places where IOError was raised rather than URLError. for better or worse, URLError already inherits from IOError so this won't break any existing code. test_urllib2net - replace bad ftp urls.
* Added an optional timeout parameter to function urllib2.urlopen,Facundo Batista2007-06-061-0/+44
| | | | | | | with tests in test_urllib2net.py (must have network resource enabled to execute them). Also modified test_urllib2.py because testing mock classes must take it into acount. Docs are also updated.
* Remove the gopherlib module. It has been raising a DeprecationWarning sinceBrett Cannon2007-05-161-15/+0
| | | | | | | Python 2.5. Also remove gopher support from urllib/urllib2. As both imported gopherlib the usage of the support would have raised a DeprecationWarning.
* Raise ResourceDenied in test_urllib2net when the Net connection goes bad.Brett Cannon2007-03-141-1/+2
|
* Patch #1627441: close sockets properly in urllib2.Georg Brandl2007-01-211-2/+27
|
* Fix test on PPC64 buildbot. It raised an IOError (really an URLError whichNeal Norwitz2006-06-111-1/+1
| | | | | derives from an IOError). That seems valid. Env Error includes both OSError and IOError, so this seems like a reasonable fix.
* Try to fix another networking test. The problem is that if hosts haveNeal Norwitz2006-06-111-4/+5
| | | | | | | | a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots. Also add more info to failure message to aid debugging test failure.
* Try to fix several networking tests. The problem is that if hosts haveNeal Norwitz2006-06-111-1/+1
| | | | | | a search path setup, some of these hosts resolve to the wrong address. By appending a period to the hostname, the hostname should only resolve to what we want it to resolve to. Hopefully this doesn't break different bots.
* Move network tests from test_urllib2 to test_urllib2net.Georg Brandl2006-05-031-1/+137
|
* Patch #1470846: fix urllib2 ProxyBasicAuthHandler.Georg Brandl2006-04-301-1/+42
|
* Fix urllib2.urlopen() handling of chunked content encoding.Jeremy Hylton2004-08-071-0/+92
The change to use the newer httplib interface admitted the possibility that we'd get an HTTP/1.1 chunked response, but the code didn't handle it correctly. The raw socket object can't be pass to addinfourl(), because it would read the undecoded response. Instead, addinfourl() must call HTTPResponse.read(), which will handle the decoding. One extra wrinkle is that the HTTPReponse object can't be passed to addinfourl() either, because it doesn't implement readline() or readlines(). As a quick hack, use socket._fileobject(), which implements those methods on top of a read buffer. (suggested by mwh) Finally, add some tests based on test_urllibnet. Thanks to Andrew Sawyers for originally reporting the chunked problem.