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
c0e07a3e
Kaydet (Commit)
c0e07a3e
authored
Eki 29, 2013
tarafından
Victor Stinner
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #19424: Fix test_warnings for locale encoding unable to encode
"\xe9\u20ac" characters
üst
a4c704b2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
test_warnings.py
Lib/test/test_warnings.py
+7
-6
No files found.
Lib/test/test_warnings.py
Dosyayı görüntüle @
c0e07a3e
...
...
@@ -336,12 +336,13 @@ class WarnTests(BaseTest):
module
=
self
.
module
)
as
w
:
self
.
module
.
resetwarnings
()
self
.
module
.
filterwarnings
(
"always"
,
category
=
UserWarning
)
self
.
module
.
warn_explicit
(
"text"
,
UserWarning
,
"nonascii
\xe9\u20ac
"
,
1
)
self
.
assertEqual
(
w
[
-
1
]
.
filename
,
"nonascii
\xe9\u20ac
"
)
self
.
module
.
warn_explicit
(
"text"
,
UserWarning
,
"surrogate
\udc80
"
,
1
)
self
.
assertEqual
(
w
[
-
1
]
.
filename
,
"surrogate
\udc80
"
)
for
filename
in
(
"nonascii
\xe9\u20ac
"
,
"surrogate
\udc80
"
):
try
:
os
.
fsencode
(
filename
)
except
UnicodeEncodeError
:
continue
self
.
module
.
warn_explicit
(
"text"
,
UserWarning
,
filename
,
1
)
self
.
assertEqual
(
w
[
-
1
]
.
filename
,
filename
)
def
test_warn_explicit_type_errors
(
self
):
# warn_explicit() should error out gracefully if it is given objects
...
...
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