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
e324c573
Kaydet (Commit)
e324c573
authored
Tem 31, 2011
tarafından
Senthil Kumaran
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
using support.transient_internet helper method in the urllib2net test.
üst
59256329
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
14 additions
and
10 deletions
+14
-10
test_urllib2net.py
Lib/test/test_urllib2net.py
+14
-10
No files found.
Lib/test/test_urllib2net.py
Dosyayı görüntüle @
e324c573
...
...
@@ -178,17 +178,21 @@ class OtherNetworkTests(unittest.TestCase):
# Some sites do not send Connection: close header.
# Verify that those work properly. (#issue12576)
try
:
with
urllib
.
request
.
urlopen
(
'http://www.imdb.com'
)
as
res
:
pass
except
ValueError
as
e
:
self
.
fail
(
"urlopen failed for sites not sending Connection:close"
)
else
:
self
.
assertTrue
(
res
)
URL
=
'http://www.imdb.com'
# mangles Connection:close
with
support
.
transient_internet
(
URL
):
try
:
with
urllib
.
request
.
urlopen
(
URL
)
as
res
:
pass
except
ValueError
as
e
:
self
.
fail
(
"urlopen failed for site not sending
\
Connection:close"
)
else
:
self
.
assertTrue
(
res
)
req
=
urllib
.
request
.
urlopen
(
'http://www.imdb.com'
)
res
=
req
.
read
()
self
.
assertTrue
(
res
)
req
=
urllib
.
request
.
urlopen
(
URL
)
res
=
req
.
read
()
self
.
assertTrue
(
res
)
def
_test_urls
(
self
,
urls
,
handlers
,
retry
=
True
):
import
time
...
...
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