[Python-checkins] cpython (3.5): test_urllibnet: set timeout on test_fileno()

victor.stinner python-checkins at python.org
Tue Mar 29 20:21:10 EDT 2016


https://hg.python.org/cpython/rev/7bd4736195ce
changeset:   100792:7bd4736195ce
branch:      3.5
parent:      100789:f75d78a59601
user:        Victor Stinner <victor.stinner at gmail.com>
date:        Wed Mar 30 02:19:01 2016 +0200
summary:
  test_urllibnet: set timeout on test_fileno()

Use the default timeout of 30 seconds to avoid blocking forever.

files:
  Lib/test/test_urllibnet.py |  2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)


diff --git a/Lib/test/test_urllibnet.py b/Lib/test/test_urllibnet.py
--- a/Lib/test/test_urllibnet.py
+++ b/Lib/test/test_urllibnet.py
@@ -104,7 +104,7 @@
     @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 "

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list