diff options
author | Georg Brandl <georg@python.org> | 2009-10-01 20:59:31 (GMT) |
---|---|---|
committer | Georg Brandl <georg@python.org> | 2009-10-01 20:59:31 (GMT) |
commit | f895cf5d33f68bfd750e4cce19f3785096812e34 (patch) | |
tree | 8e87952720331e39333b6c5339c10983ab8830e0 /Doc/library/unittest.rst | |
parent | 46cc46af07b3d2e495117f10e591cf1dfc77608e (diff) | |
download | cpython-f895cf5d33f68bfd750e4cce19f3785096812e34.zip cpython-f895cf5d33f68bfd750e4cce19f3785096812e34.tar.gz cpython-f895cf5d33f68bfd750e4cce19f3785096812e34.tar.bz2 |
#7031: Add TestCase.assertIsInstance and negated method.
Diffstat (limited to 'Doc/library/unittest.rst')
-rw-r--r-- | Doc/library/unittest.rst | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 078c339..4de6829 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -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]) |