]> granicus.if.org Git - python/commitdiff
#13387: add note about checking the exact type in assertIsInstance doc.
authorEzio Melotti <ezio.melotti@gmail.com>
Fri, 18 Nov 2011 16:59:36 +0000 (18:59 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Fri, 18 Nov 2011 16:59:36 +0000 (18:59 +0200)
Doc/library/unittest.rst

index 16a3a36695d49c7963689c4e4db2ea7d9edb8ed4..3d8a84db38e1803ce4f63d7077e368fbeebc5dc9 100644 (file)
@@ -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