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
bfa664c5
Kaydet (Commit)
bfa664c5
authored
Eki 31, 2012
tarafından
R David Murray
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
#12890: fix test on windows
Patch by Stephen Tonkin.
üst
bd54f0eb
cc4bacf2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
6 deletions
+5
-6
test_cgitb.py
Lib/test/test_cgitb.py
+4
-6
ACKS
Misc/ACKS
+1
-0
No files found.
Lib/test/test_cgitb.py
Dosyayı görüntüle @
bfa664c5
...
...
@@ -36,13 +36,12 @@ class TestCgitb(unittest.TestCase):
self
.
assertIn
(
"ValueError"
,
text
)
self
.
assertIn
(
"Hello World"
,
text
)
@unittest.skipIf
(
sys
.
platform
==
'win32'
,
"test fails on windows, see issue 12890"
)
def
test_syshook_no_logdir_default_format
(
self
):
with
temp_dir
()
as
tracedir
:
rc
,
out
,
err
=
assert_python_failure
(
'-c'
,
(
'import cgitb; cgitb.enable(logdir=
"
%
s"
); '
'raise ValueError("Hello World")'
)
%
tracedir
)
(
'import cgitb; cgitb.enable(logdir=
%
s
); '
'raise ValueError("Hello World")'
)
%
repr
(
tracedir
)
)
out
=
out
.
decode
(
sys
.
getfilesystemencoding
())
self
.
assertIn
(
"ValueError"
,
out
)
self
.
assertIn
(
"Hello World"
,
out
)
...
...
@@ -50,14 +49,13 @@ class TestCgitb(unittest.TestCase):
self
.
assertIn
(
'<p>'
,
out
)
self
.
assertIn
(
'</p>'
,
out
)
@unittest.skipIf
(
sys
.
platform
==
'win32'
,
"test fails on windows, see issue 12890"
)
def
test_syshook_no_logdir_text_format
(
self
):
# Issue 12890: we were emitting the <p> tag in text mode.
with
temp_dir
()
as
tracedir
:
rc
,
out
,
err
=
assert_python_failure
(
'-c'
,
(
'import cgitb; cgitb.enable(format="text", logdir=
"
%
s"
); '
'raise ValueError("Hello World")'
)
%
tracedir
)
(
'import cgitb; cgitb.enable(format="text", logdir=
%
s
); '
'raise ValueError("Hello World")'
)
%
repr
(
tracedir
)
)
out
=
out
.
decode
(
sys
.
getfilesystemencoding
())
self
.
assertIn
(
"ValueError"
,
out
)
self
.
assertIn
(
"Hello World"
,
out
)
...
...
Misc/ACKS
Dosyayı görüntüle @
bfa664c5
...
...
@@ -1175,6 +1175,7 @@ Bennett Todd
R Lindsay Todd
Eugene Toder
Erik Tollerud
Stephen Tonkin
Matias Torchinsky
Sandro Tosi
Richard Townsend
...
...
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