summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2011-11-18 16:59:36 (GMT)
committerEzio Melotti <ezio.melotti@gmail.com>2011-11-18 16:59:36 (GMT)
commitaa512f05a40774e0d6656d6bcafeaf3511dc039b (patch)
tree2f04da54c08eb2d432e03e2e399f70a13d8d367b
parent169ed5946ad3fae10a1b1f703e6b354c4c611138 (diff)
downloadcpython-aa512f05a40774e0d6656d6bcafeaf3511dc039b.zip
cpython-aa512f05a40774e0d6656d6bcafeaf3511dc039b.tar.gz
cpython-aa512f05a40774e0d6656d6bcafeaf3511dc039b.tar.bz2
#13387: add note about checking the exact type in assertIsInstance doc.
-rw-r--r--Doc/library/unittest.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst
index 16a3a36..3d8a84d 100644
--- a/Doc/library/unittest.rst
+++ b/Doc/library/unittest.rst
@@ -895,6 +895,8 @@ Test cases
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`).
+ To check for a specific type (without including superclasses) use
+ :func:`assertIs(type(obj), cls) <assertIs>`.
.. versionadded:: 2.7