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
cb2b0e45
Kaydet (Commit)
cb2b0e45
authored
Mar 23, 2009
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
comply with the evilJavaNamingScheme for attribute names
It seems my love of PEP 8 overrode the need for consistentcy
üst
692428e7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
11 deletions
+11
-11
unittest.rst
Doc/library/unittest.rst
+2
-2
test_unittest.py
Lib/test/test_unittest.py
+2
-2
unittest.py
Lib/unittest.py
+7
-7
No files found.
Doc/library/unittest.rst
Dosyayı görüntüle @
cb2b0e45
...
...
@@ -950,7 +950,7 @@ tools which support interactive reporting while tests are being run.
:func:`expectedFailure` decorator.
The default implementation appends a tuple ``(test, formatted_err)`` to the
instance's ``expected
_f
ailures`` attribute, where *formatted_err* is a
instance's ``expected
F
ailures`` attribute, where *formatted_err* is a
formatted traceback derived from *err*.
...
...
@@ -960,7 +960,7 @@ tools which support interactive reporting while tests are being run.
decorator, but succeeded.
The default implementation appends the test to the instance's
``unexpected
_s
uccesses`` attribute.
``unexpected
S
uccesses`` attribute.
.. _testloader-objects:
...
...
Lib/test/test_unittest.py
Dosyayı görüntüle @
cb2b0e45
...
...
@@ -2362,7 +2362,7 @@ class Test_TestSkipping(TestCase):
test
.
run
(
result
)
self
.
assertEqual
(
events
,
[
'startTest'
,
'addExpectedFailure'
,
'stopTest'
])
self
.
assertEqual
(
result
.
expected
_f
ailures
[
0
][
0
],
test
)
self
.
assertEqual
(
result
.
expected
F
ailures
[
0
][
0
],
test
)
self
.
assertTrue
(
result
.
wasSuccessful
())
def
test_unexpected_success
(
self
):
...
...
@@ -2377,7 +2377,7 @@ class Test_TestSkipping(TestCase):
self
.
assertEqual
(
events
,
[
'startTest'
,
'addUnexpectedSuccess'
,
'stopTest'
])
self
.
assertFalse
(
result
.
failures
)
self
.
assertEqual
(
result
.
unexpected
_s
uccesses
,
[
test
])
self
.
assertEqual
(
result
.
unexpected
S
uccesses
,
[
test
])
self
.
assertTrue
(
result
.
wasSuccessful
())
...
...
Lib/unittest.py
Dosyayı görüntüle @
cb2b0e45
...
...
@@ -176,8 +176,8 @@ class TestResult(object):
self
.
errors
=
[]
self
.
testsRun
=
0
self
.
skipped
=
[]
self
.
expected
_f
ailures
=
[]
self
.
unexpected
_s
uccesses
=
[]
self
.
expected
F
ailures
=
[]
self
.
unexpected
S
uccesses
=
[]
self
.
shouldStop
=
False
def
startTest
(
self
,
test
):
...
...
@@ -209,12 +209,12 @@ class TestResult(object):
def
addExpectedFailure
(
self
,
test
,
err
):
"""Called when an expected failure/error occured."""
self
.
expected
_f
ailures
.
append
(
self
.
expected
F
ailures
.
append
(
(
test
,
self
.
_exc_info_to_string
(
err
,
test
)))
def
addUnexpectedSuccess
(
self
,
test
):
"""Called when a test was expected to fail, but succeed."""
self
.
unexpected
_s
uccesses
.
append
(
test
)
self
.
unexpected
S
uccesses
.
append
(
test
)
def
wasSuccessful
(
self
):
"Tells whether or not this result was a success"
...
...
@@ -923,10 +923,10 @@ class TextTestRunner(object):
self
.
stream
.
writeln
(
"Ran
%
d test
%
s in
%.3
fs"
%
(
run
,
run
!=
1
and
"s"
or
""
,
timeTaken
))
self
.
stream
.
writeln
()
results
=
map
(
len
,
(
result
.
expected
_f
ailures
,
result
.
unexpected
_s
uccesses
,
results
=
map
(
len
,
(
result
.
expected
F
ailures
,
result
.
unexpected
S
uccesses
,
result
.
skipped
))
expected
_fails
,
unexpected_s
uccesses
,
skipped
=
results
expected
Fails
,
unexpectedS
uccesses
,
skipped
=
results
infos
=
[]
if
not
result
.
wasSuccessful
():
self
.
stream
.
write
(
"FAILED"
)
...
...
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