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
4a452352
Kaydet (Commit)
4a452352
authored
Eki 13, 2016
tarafından
Guido van Rossum
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #26869: Document unittest.TestCase.longMessage. (Mariatta)
üst
ba29a4fd
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
13 deletions
+11
-13
unittest.rst
Doc/library/unittest.rst
+11
-13
No files found.
Doc/library/unittest.rst
Dosyayı görüntüle @
4a452352
...
...
@@ -1316,19 +1316,17 @@ Test cases
.. attribute:: longMessage
If set to ``True`` then any explicit failure message you pass in to the
:ref:`assert methods <assert-methods>` will be appended to the end of the
normal failure message. The normal messages contain useful information
about the objects involved, for example the message from assertEqual
shows you the repr of the two unequal objects. Setting this attribute
to ``True`` allows you to have a custom error message in addition to the
normal one.
This attribute defaults to ``True``. If set to False then a custom message
passed to an assert method will silence the normal message.
The class setting can be overridden in individual tests by assigning an
instance attribute to ``True`` or ``False`` before calling the assert methods.
This class attribute determines what happens when a custom failure message
is passed as the msg argument to an assertXYY call that fails.
``True`` is the default value. In this case, the custom message is appended
to the end of the standard failure message.
When set to ``False``, the custom message replaces the standard message.
The class setting can be overridden in individual test methods by assigning
an instance attribute, self.longMessage, to ``True`` or ``False`` before
calling the assert methods.
The class setting gets reset before each test call.
.. versionadded:: 3.1
...
...
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