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
7cd97fcf
Kaydet (Commit)
7cd97fcf
authored
Tem 31, 2013
tarafından
Christian Heimes
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Sade Fark
merge
üst
6ffa5ce1
92e2a220
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
unittest.rst
Doc/library/unittest.rst
+3
-3
No files found.
Doc/library/unittest.rst
Dosyayı görüntüle @
7cd97fcf
...
...
@@ -974,12 +974,12 @@ Test cases
Test that a warning is triggered when *callable* is called with any
positional or keyword arguments that are also passed to
:meth:`assertWarns`. The test passes if *warning* is triggered and
fails if it isn't. A
lso, any unexpected
exception is an error.
fails if it isn't. A
ny
exception is an error.
To catch any of a group of warnings, a tuple containing the warning
classes may be passed as *warnings*.
If only the *warning* and possibly the *msg* arguments are given,
return
s
a context manager so that the code under test can be written
return a context manager so that the code under test can be written
inline rather than as a function::
with self.assertWarns(SomeWarning):
...
...
@@ -992,7 +992,7 @@ Test cases
:attr:`warning` attribute, and the source line which triggered the
warnings in the :attr:`filename` and :attr:`lineno` attributes.
This can be useful if the intention is to perform additional checks
on the
exception raised
::
on the
warning caught
::
with self.assertWarns(SomeWarning) as cm:
do_something()
...
...
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