cpython: 00240ddce1d0 (original) (raw)

Mercurial > cpython

changeset 100894:00240ddce1d0 3.5

Issue #21069: Move test_fileno() from test_urllibnet and rewrite it * No longer attempts to close already freed socket file descriptor * Use socket object to be compatible with Windows * Do not use a timeout to avoid complication with non-blocking mode * Use internal localhost server rather than depending on a third party * Avoid trouble with buffered HTTP data by testing tunnelled CONNECT data [#21069]

Martin Panter vadmium+py@gmail.com
date Sat, 09 Apr 2016 14:03:17 +0000
parents 0e19f421dc9e
children 4c19396bd4a0 15cbeb389f17
files Lib/test/test_httplib.py Lib/test/test_urllibnet.py
diffstat 2 files changed, 41 insertions(+), 11 deletions(-)[+] [-] Lib/test/test_httplib.py 41 Lib/test/test_urllibnet.py 11

line wrap: on

line diff

--- a/Lib/test/test_httplib.py +++ b/Lib/test/test_httplib.py @@ -915,6 +915,47 @@ class BasicTest(TestCase): self.assertEqual(sock.file.read(), extradata) #we read to the end resp.close()

+

+

+

+ class ExtendedReadTest(TestCase): """ Test peek(), read1(), readline()

--- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -99,17 +99,6 @@ class urlopenNetworkTests(unittest.TestC open_url.close() self.assertEqual(code, 404)

- def test_bad_address(self): # Make sure proper exception is raised when connecting to a bogus # address.