From 598c3a8ad1468bcec8e4b2c4ec8b3069e48289c3 Mon Sep 17 00:00:00 2001 From: Nick Coghlan Date: Sun, 8 Feb 2009 04:01:00 +0000 Subject: [PATCH] Fix broken socket.makefile emulation in test_urllib --- Lib/test/test_urllib.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Lib/test/test_urllib.py b/Lib/test/test_urllib.py index a46f4219edf..a684ed422ad 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)