Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
53f8ba52
Commit
53f8ba52
authored
Mar 30, 2016
by
Victor Stinner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_urllibnet: set timeout on test_fileno()
Use the default timeout of 30 seconds to avoid blocking forever.
parent
9db2ae72
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
1 deletion
+1
-1
Lib/test/test_urllibnet.py
Lib/test/test_urllibnet.py
+1
-1
No files found.
Lib/test/test_urllibnet.py
View file @
53f8ba52
...
@@ -104,7 +104,7 @@ class urlopenNetworkTests(unittest.TestCase):
...
@@ -104,7 +104,7 @@ class urlopenNetworkTests(unittest.TestCase):
@
unittest
.
skipIf
(
sys
.
platform
in
(
'win32'
,),
'not appropriate for Windows'
)
@
unittest
.
skipIf
(
sys
.
platform
in
(
'win32'
,),
'not appropriate for Windows'
)
def
test_fileno
(
self
):
def
test_fileno
(
self
):
# Make sure fd returned by fileno is valid.
# 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
()
fd
=
open_url
.
fileno
()
with
os
.
fdopen
(
fd
,
'rb'
)
as
f
:
with
os
.
fdopen
(
fd
,
'rb'
)
as
f
:
self
.
assertTrue
(
f
.
read
(),
"reading from file created using fd "
self
.
assertTrue
(
f
.
read
(),
"reading from file created using fd "
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment