test_urllibnet: set timeout on test_fileno()

Use the default timeout of 30 seconds to avoid blocking forever.
This commit is contained in:
Victor Stinner 2016-03-30 02:19:01 +02:00
parent 9db2ae7263
commit 53f8ba52e6
1 changed files with 1 additions and 1 deletions

View 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 "