diff options
author | Ezio Melotti <ezio.melotti@gmail.com> | 2011-11-18 16:59:36 (GMT) |
---|---|---|
committer | Ezio Melotti <ezio.melotti@gmail.com> | 2011-11-18 16:59:36 (GMT) |
commit | fabf0275a91aeb84f4bca02906ee6f181abc0344 (patch) | |
tree | 83782021547b136cb906acea8f50ff8def605443 | |
parent | 7f78ddc3adf77adf1e8a72788ca8306fe3abd782 (diff) | |
download | cpython-fabf0275a91aeb84f4bca02906ee6f181abc0344.zip cpython-fabf0275a91aeb84f4bca02906ee6f181abc0344.tar.gz cpython-fabf0275a91aeb84f4bca02906ee6f181abc0344.tar.bz2 |
#13387: add note about checking the exact type in assertIsInstance doc.
-rw-r--r-- | Doc/library/unittest.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/unittest.rst b/Doc/library/unittest.rst index 32f66fe..990bd48 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) <assertIs>`. .. versionadded:: 3.2 |