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
9794a26d
Kaydet (Commit)
9794a26d
authored
Kas 04, 2010
tarafından
Ezio Melotti
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Merge the doc for assertIs[Not], assertIs[Not]None, and assert[Not]IsInstance.
üst
de5919dc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
32 deletions
+9
-32
unittest.rst
Doc/library/unittest.rst
+9
-32
No files found.
Doc/library/unittest.rst
Dosyayı görüntüle @
9794a26d
...
...
@@ -871,34 +871,18 @@ Test cases
:meth:`failIf`; use :meth:`assertFalse`.
.. method:: assertIs(expr1, expr2, msg=None)
.. method:: assertIs(first, second, msg=None)
assertIsNot(first, second, msg=None)
This signals a test failure if *expr1* and *expr2* don't evaluate to the same
object.
.. versionadded:: 3.1
.. method:: assertIsNot(expr1, expr2, msg=None)
The inverse of the :meth:`assertIs` method.
This signals a test failure if *expr1* and *expr2* evaluate to the same
object.
Test that *first* and *second* evaluate (or don't evaluate) to the same object.
.. versionadded:: 3.1
.. method:: assertIsNone(expr, msg=None)
assertIsNotNone(expr, msg=None)
This signals a test failure if *expr* is not None.
.. versionadded:: 3.1
.. method:: assertIsNotNone(expr, msg=None)
The inverse of the :meth:`assertIsNone` method.
This signals a test failure if *expr* is None.
Test that *expr* is (or is not) None.
.. versionadded:: 3.1
...
...
@@ -906,7 +890,7 @@ Test cases
.. method:: assertIn(first, second, msg=None)
assertNotIn(first, second, msg=None)
Test
s that *first* is or is not
in *second* with an explanatory error
Test
that *first* is (or is not)
in *second* with an explanatory error
message as appropriate.
If specified, *msg* will be used as the error message on failure.
...
...
@@ -915,17 +899,10 @@ Test cases
.. method:: assertIsInstance(obj, cls, msg=None)
assertNotIsInstance(obj, cls, msg=None)
This signals a test failure if *obj* is not an instance of *cls* (which
can be a class or a tuple of classes, as supported by :func:`isinstance`).
.. versionadded:: 3.2
.. method:: assertNotIsInstance(obj, cls, msg=None)
The inverse of the :meth:`assertIsInstance` method. This signals a test
failure if *obj* is an instance of *cls*.
Test that *obj* is (or is not) an instance of *cls* (which can be a
class or a tuple of classes, as supported by :func:`isinstance`).
.. versionadded:: 3.2
...
...
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