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
98b9c07a
Kaydet (Commit)
98b9c07a
authored
May 08, 2008
tarafından
Brett Cannon
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Document the 'record' argument for test.test_support.catch_warning().
üst
5d023c3a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
4 deletions
+6
-4
test.rst
Doc/library/test.rst
+6
-4
No files found.
Doc/library/test.rst
Dosyayı görüntüle @
98b9c07a
...
...
@@ -283,13 +283,15 @@ The :mod:`test.test_support` module defines the following functions:
This will run all tests defined in the named module.
.. function:: catch_warning()
.. function:: catch_warning(
record=True
)
This is
a context manager that guards the warnings filter from being
Return
a context manager that guards the warnings filter from being
permanently changed and records the data of the last warning that has been
issued.
issued. The ``record`` argument specifies whether any raised warnings are
captured by the object returned by :func:`warnings.catch_warning` or allowed
to propagate as normal.
Use
like this::
The context manager is typically used
like this::
with catch_warning() as w:
warnings.warn("foo")
...
...
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