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
f2c25c5c
Kaydet (Commit)
f2c25c5c
authored
Haz 05, 2010
tarafından
Michael Foord
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Fix unittest tests after previous commit.
üst
5fe21ff9
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
4 deletions
+7
-4
case.py
Lib/unittest/case.py
+1
-1
test_case.py
Lib/unittest/test/test_case.py
+6
-3
No files found.
Lib/unittest/case.py
Dosyayı görüntüle @
f2c25c5c
...
...
@@ -891,7 +891,7 @@ class TestCase(object):
'Second argument is not a string'
))
if
first
!=
second
:
standardMsg
=
'
%
s !=
%
s'
%
(
safe_repr
(
d1
,
True
),
safe_repr
(
d2
,
True
))
standardMsg
=
'
%
s !=
%
s'
%
(
safe_repr
(
first
,
True
),
safe_repr
(
second
,
True
))
diff
=
'
\n
'
+
''
.
join
(
difflib
.
ndiff
(
first
.
splitlines
(
True
),
second
.
splitlines
(
True
)))
standardMsg
=
self
.
_truncateMessage
(
standardMsg
,
diff
)
...
...
Lib/unittest/test/test_case.py
Dosyayı görüntüle @
f2c25c5c
...
...
@@ -807,7 +807,7 @@ test case
A test case is the smallest unit of testing. [...] You may provide your
own implementation that does not subclass from TestCase, of course.
"""
sample_text_error
=
b
"""
sample_text_error
=
b
"""
\
- http://www.python.org/doc/2.3/lib/module-unittest.html
? ^
+ http://www.python.org/doc/2.4.1/lib/module-unittest.html
...
...
@@ -818,15 +818,18 @@ test case
? +++++++++++++++++++++
+ own implementation that does not subclass from TestCase, of course.
"""
self
.
maxDiff
=
None
for
type_changer
in
(
lambda
x
:
x
,
lambda
x
:
x
.
decode
(
'utf8'
)):
try
:
self
.
assertMultiLineEqual
(
type_changer
(
sample_text
),
type_changer
(
revised_sample_text
))
except
self
.
failureException
,
e
:
# need to remove the first line of the error message
error
=
str
(
e
)
.
encode
(
'utf8'
)
.
split
(
'
\n
'
,
1
)[
1
]
# assertMultiLineEqual is hooked up as the default for
# unicode strings - so we can't use it for this check
self
.
assertTrue
(
sample_text_error
==
str
(
e
)
.
encode
(
'utf8'
)
)
self
.
assertTrue
(
sample_text_error
==
error
)
def
testAssertIsNone
(
self
):
self
.
assertIsNone
(
None
)
...
...
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