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
2f677561
Kaydet (Commit)
2f677561
authored
Şub 21, 2010
tarafından
Michael Foord
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Silence UnicodeWarning in crazy unittest test.
üst
92cb4a8c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
4 deletions
+7
-4
test_unittest.py
Lib/test/test_unittest.py
+7
-4
No files found.
Lib/test/test_unittest.py
Dosyayı görüntüle @
2f677561
...
...
@@ -16,6 +16,7 @@ import types
from
copy
import
deepcopy
from
cStringIO
import
StringIO
import
pickle
import
warnings
### Support code
...
...
@@ -2573,10 +2574,12 @@ class Test_TestCase(TestCase, TestEquality, TestHashing):
with
self
.
assertRaises
(
self
.
failureException
):
self
.
assertDictContainsSubset
({
'a'
:
1
,
'c'
:
1
},
{
'a'
:
1
})
one
=
''
.
join
(
chr
(
i
)
for
i
in
range
(
255
))
# this used to cause a UnicodeDecodeError constructing the failure msg
with
self
.
assertRaises
(
self
.
failureException
):
self
.
assertDictContainsSubset
({
'foo'
:
one
},
{
'foo'
:
u'
\uFFFD
'
})
with
warnings
.
catch_warnings
(
record
=
True
):
# silence the UnicodeWarning
one
=
''
.
join
(
chr
(
i
)
for
i
in
range
(
255
))
# this used to cause a UnicodeDecodeError constructing the failure msg
with
self
.
assertRaises
(
self
.
failureException
):
self
.
assertDictContainsSubset
({
'foo'
:
one
},
{
'foo'
:
u'
\uFFFD
'
})
def
testAssertEqual
(
self
):
equal_pairs
=
[
...
...
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