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
2f142581
Commit
2f142581
authored
Jan 26, 2008
by
Neal Norwitz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Get this test to pass
parent
e3777b4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Lib/test/test_urllib2net.py
Lib/test/test_urllib2net.py
+4
-3
No files found.
Lib/test/test_urllib2net.py
View file @
2f142581
...
...
@@ -17,7 +17,8 @@ def _urlopen_with_retry(host, *args, **kwargs):
for
i
in
range
(
3
):
try
:
return
urllib2
.
urlopen
(
host
,
*
args
,
**
kwargs
)
except
urllib2
.
URLError
as
last_exc
:
except
urllib2
.
URLError
as
e
:
last_exc
=
e
continue
except
:
raise
...
...
@@ -310,13 +311,13 @@ class TimeoutTest(unittest.TestCase):
socket
.
setdefaulttimeout
(
60
)
try
:
u
=
_urlopen_with_retry
(
self
.
FTP_HOST
,
timeout
=
None
)
self
.
assertEqual
(
u
.
fp
.
fp
.
_sock
.
gettimeout
(),
60
)
self
.
assertEqual
(
u
.
fp
.
fp
.
raw
.
_sock
.
gettimeout
(),
60
)
finally
:
socket
.
setdefaulttimeout
(
prev
)
def
test_ftp_NoneNodefault
(
self
):
u
=
_urlopen_with_retry
(
self
.
FTP_HOST
,
timeout
=
None
)
self
.
assertTrue
(
u
.
fp
.
fp
.
_sock
.
gettimeout
()
is
None
)
self
.
assertTrue
(
u
.
fp
.
fp
.
raw
.
_sock
.
gettimeout
()
is
None
)
def
test_ftp_Value
(
self
):
u
=
_urlopen_with_retry
(
self
.
FTP_HOST
,
timeout
=
60
)
...
...
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