Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 53f8ba5

Browse files
committed
test_urllibnet: set timeout on test_fileno()
Use the default timeout of 30 seconds to avoid blocking forever.
1 parent 9db2ae7 commit 53f8ba5

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Lib/test/test_urllibnet.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def test_getcode(self):
104104
@unittest.skipIf(sys.platform in ('win32',), 'not appropriate for Windows')
105105
def test_fileno(self):
106106
# Make sure fd returned by fileno is valid.
107-
with self.urlopen("http://www.google.com/", timeout=None) as open_url:
107+
with self.urlopen("http://www.google.com/") as open_url:
108108
fd = open_url.fileno()
109109
with os.fdopen(fd, 'rb') as f:
110110
self.assertTrue(f.read(), "reading from file created using fd "

0 commit comments

Comments
 (0)