From: Ezio Melotti Date: Fri, 18 Nov 2011 16:59:36 +0000 (+0200) Subject: #13387: add note about checking the exact type in assertIsInstance doc. X-Git-Tag: v3.3.0a1~811^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=fabf0275a91aeb84f4bca02906ee6f181abc0344;p=python #13387: add note about checking the exact type in assertIsInstance doc. --- diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 32f66feef2..990bd4853f 100644 --- a/Doc/library/unittest.rst +++ b/Doc/library/unittest.rst @@ -929,6 +929,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) `. .. versionadded:: 3.2