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
3218c314
Kaydet (Commit)
3218c314
authored
Eki 17, 2010
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
test_httpservers: Fix skip test check, the python executable path have to be
encodable to utf-8, not to the file1 encoding.
üst
23d05c1d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
test_httpservers.py
Lib/test/test_httpservers.py
+10
-7
No files found.
Lib/test/test_httpservers.py
Dosyayı görüntüle @
3218c314
...
@@ -310,15 +310,18 @@ class CGIHTTPServerTestCase(BaseTestCase):
...
@@ -310,15 +310,18 @@ class CGIHTTPServerTestCase(BaseTestCase):
else
:
else
:
self
.
pythonexe
=
sys
.
executable
self
.
pythonexe
=
sys
.
executable
try
:
# The python executable path is written as the first line of the
# CGI Python script. The encoding cookie cannot be used, and so the
# path should be encodable to the default script encoding (utf-8)
self
.
pythonexe
.
encode
(
'utf-8'
)
except
UnicodeEncodeError
:
self
.
tearDown
()
raise
self
.
skipTest
(
"Python executable path is not encodable to utf-8"
)
self
.
file1_path
=
os
.
path
.
join
(
self
.
cgi_dir
,
'file1.py'
)
self
.
file1_path
=
os
.
path
.
join
(
self
.
cgi_dir
,
'file1.py'
)
with
open
(
self
.
file1_path
,
'w'
)
as
file1
:
with
open
(
self
.
file1_path
,
'w'
)
as
file1
:
try
:
self
.
pythonexe
.
encode
(
file1
.
encoding
)
except
UnicodeEncodeError
:
self
.
tearDown
()
raise
self
.
skipTest
(
"Python executable path is not encodable to
%
s"
%
file1
.
encoding
)
file1
.
write
(
cgi_file1
%
self
.
pythonexe
)
file1
.
write
(
cgi_file1
%
self
.
pythonexe
)
os
.
chmod
(
self
.
file1_path
,
0
o777
)
os
.
chmod
(
self
.
file1_path
,
0
o777
)
...
...
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