diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-10-04 20:19:21 (GMT) |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-10-04 20:19:21 (GMT) |
commit | 6e8c75755a1bb0cd8fb79944a8617802aa0c4e44 (patch) | |
tree | 03d732d40f80da6edce6c895d0876c5add347e59 /Doc/library | |
parent | 23c5050b25be66646af4d8a8fc2f9338a51e226a (diff) | |
download | cpython-6e8c75755a1bb0cd8fb79944a8617802aa0c4e44.zip cpython-6e8c75755a1bb0cd8fb79944a8617802aa0c4e44.tar.gz cpython-6e8c75755a1bb0cd8fb79944a8617802aa0c4e44.tar.bz2 |
Merged revisions 74865,75175,75180 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r74865 | georg.brandl | 2009-09-17 02:49:37 -0500 (Thu, 17 Sep 2009) | 1 line
#6912: add "with" block support to pindent.
........
r75175 | georg.brandl | 2009-10-01 15:11:14 -0500 (Thu, 01 Oct 2009) | 1 line
Fix some weird whitespace and two other overlong lines.
........
r75180 | georg.brandl | 2009-10-01 15:59:31 -0500 (Thu, 01 Oct 2009) | 1 line
#7031: Add TestCase.assertIsInstance and negated method.
........
Diffstat (limited to 'Doc/library')
-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 494c2d7..aa76308 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -952,6 +952,22 @@ Test cases .. versionadded:: 3.1 + .. 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:: 3.2 + + + .. 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:: 3.2 + + .. method:: assertFalse(expr, msg=None) failIf(expr, msg=None) |