mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
#7031: Add TestCase.assertIsInstance and negated method.
This commit is contained in:
parent
46cc46af07
commit
f895cf5d33
3 changed files with 41 additions and 0 deletions
|
@ -955,6 +955,22 @@ Test cases
|
|||
.. versionadded:: 2.7
|
||||
|
||||
|
||||
.. method:: assertIsInstance(obj, cls[, msg])
|
||||
|
||||
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:: 2.7
|
||||
|
||||
|
||||
.. method:: assertNotIsInstance(obj, cls[, msg])
|
||||
|
||||
The inverse of the :meth:`assertIsInstance` method. This signals a test
|
||||
failure if *obj* is an instance of *cls*.
|
||||
|
||||
.. versionadded:: 2.7
|
||||
|
||||
|
||||
.. method:: assertFalse(expr[, msg])
|
||||
failIf(expr[, msg])
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue