]> granicus.if.org Git - python/commitdiff
test_urllibnet: set timeout on test_fileno()
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 30 Mar 2016 00:19:01 +0000 (02:19 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 30 Mar 2016 00:19:01 +0000 (02:19 +0200)
Use the default timeout of 30 seconds to avoid blocking forever.

Lib/test/test_urllibnet.py

index b9b926265c839d6968d3b7f0a911c15e6c5da8ac..d5110a633f4334dec14156fb07daf02ffcd7617d 100644 (file)
@@ -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 "