From 53f8ba52e6f64a7e352077a9a71507f4c042f7b2 Mon Sep 17 00:00:00 2001 From: Victor Stinner Date: Wed, 30 Mar 2016 02:19:01 +0200 Subject: [PATCH] test_urllibnet: set timeout on test_fileno() Use the default timeout of 30 seconds to avoid blocking forever. --- Lib/test/test_urllibnet.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py index b9b926265c8..d5110a633f4 100644 --- a/Lib/test/test_urllibnet.py +++ b/Lib/test/test_urllibnet.py @@ -104,7 +104,7 @@ class urlopenNetworkTests(unittest.TestCase): @unittest.skipIf(sys.platform in ('win32',), 'not appropriate for Windows') def test_fileno(self): # Make sure fd returned by fileno is valid. - with self.urlopen("http://www.google.com/", timeout=None) as open_url: + with self.urlopen("http://www.google.com/") as open_url: fd = open_url.fileno() with os.fdopen(fd, 'rb') as f: self.assertTrue(f.read(), "reading from file created using fd "