From: Nick Coghlan Date: Sun, 8 Feb 2009 04:01:00 +0000 (+0000) Subject: Fix broken socket.makefile emulation in test_urllib X-Git-Tag: v3.1a1~236 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=598c3a8ad1468bcec8e4b2c4ec8b3069e48289c3;p=thirdparty%2FPython%2Fcpython.git Fix broken socket.makefile emulation in test_urllib --- diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index a46f4219edfc..a684ed422ade 100644 --- a/Lib/test/test_urllib.py +++ b/Lib/test/test_urllib.py @@ -146,7 +146,8 @@ class urlopen_HttpTests(unittest.TestCase): def fakehttp(self, fakedata): class FakeSocket(io.BytesIO): def sendall(self, str): pass - def makefile(self, mode, name): return self + def makefile(self, *args, **kwds): + return self def read(self, amt=None): if self.closed: return b"" return io.BytesIO.read(self, amt)