diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 16a3a36695d..3d8a84db38e 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) `. .. versionadded:: 2.7