Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
bc2c4c99
Kaydet (Commit)
bc2c4c99
authored
Eyl 16, 2014
tarafından
Antoine Pitrou
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Replace bad ftp URLs in test_urllib2net
üst
637e4544
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
test_urllib2net.py
Lib/test/test_urllib2net.py
+6
-6
No files found.
Lib/test/test_urllib2net.py
Dosyayı görüntüle @
bc2c4c99
...
@@ -103,9 +103,9 @@ class OtherNetworkTests(unittest.TestCase):
...
@@ -103,9 +103,9 @@ class OtherNetworkTests(unittest.TestCase):
def
test_ftp
(
self
):
def
test_ftp
(
self
):
urls
=
[
urls
=
[
'ftp://ftp.
kernel.org/pub/linux/kernel
/README'
,
'ftp://ftp.
debian.org/debian
/README'
,
'ftp://ftp.kernel.org/pub/linux/kernel
/non-existent-file'
,
(
'ftp://ftp.debian.org/debian
/non-existent-file'
,
#'ftp://ftp.kernel.org/pub/leenox/kernel/test'
,
None
,
urllib
.
error
.
URLError
)
,
'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC'
'ftp://gatekeeper.research.compaq.com/pub/DEC/SRC'
'/research-reports/00README-Legal-Rules-Regs'
,
'/research-reports/00README-Legal-Rules-Regs'
,
]
]
...
@@ -215,21 +215,22 @@ class OtherNetworkTests(unittest.TestCase):
...
@@ -215,21 +215,22 @@ class OtherNetworkTests(unittest.TestCase):
urlopen
=
_wrap_with_retry_thrice
(
urlopen
,
urllib
.
error
.
URLError
)
urlopen
=
_wrap_with_retry_thrice
(
urlopen
,
urllib
.
error
.
URLError
)
for
url
in
urls
:
for
url
in
urls
:
with
self
.
subTest
(
url
=
url
):
if
isinstance
(
url
,
tuple
):
if
isinstance
(
url
,
tuple
):
url
,
req
,
expected_err
=
url
url
,
req
,
expected_err
=
url
else
:
else
:
req
=
expected_err
=
None
req
=
expected_err
=
None
with
support
.
transient_internet
(
url
):
with
support
.
transient_internet
(
url
):
debug
(
url
)
try
:
try
:
f
=
urlopen
(
url
,
req
,
TIMEOUT
)
f
=
urlopen
(
url
,
req
,
TIMEOUT
)
except
OSError
as
err
:
except
OSError
as
err
:
debug
(
err
)
if
expected_err
:
if
expected_err
:
msg
=
(
"Didn't get expected error(s)
%
s for
%
s
%
s, got
%
s:
%
s"
%
msg
=
(
"Didn't get expected error(s)
%
s for
%
s
%
s, got
%
s:
%
s"
%
(
expected_err
,
url
,
req
,
type
(
err
),
err
))
(
expected_err
,
url
,
req
,
type
(
err
),
err
))
self
.
assertIsInstance
(
err
,
expected_err
,
msg
)
self
.
assertIsInstance
(
err
,
expected_err
,
msg
)
else
:
raise
except
urllib
.
error
.
URLError
as
err
:
except
urllib
.
error
.
URLError
as
err
:
if
isinstance
(
err
[
0
],
socket
.
timeout
):
if
isinstance
(
err
[
0
],
socket
.
timeout
):
print
(
"<timeout:
%
s>"
%
url
,
file
=
sys
.
stderr
)
print
(
"<timeout:
%
s>"
%
url
,
file
=
sys
.
stderr
)
...
@@ -246,7 +247,6 @@ class OtherNetworkTests(unittest.TestCase):
...
@@ -246,7 +247,6 @@ class OtherNetworkTests(unittest.TestCase):
except
socket
.
timeout
:
except
socket
.
timeout
:
print
(
"<timeout:
%
s>"
%
url
,
file
=
sys
.
stderr
)
print
(
"<timeout:
%
s>"
%
url
,
file
=
sys
.
stderr
)
f
.
close
()
f
.
close
()
debug
(
"******** next url coming up..."
)
time
.
sleep
(
0.1
)
time
.
sleep
(
0.1
)
def
_extra_handlers
(
self
):
def
_extra_handlers
(
self
):
...
...
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