]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Issue #20804: Document the limitation of the unittest.mock.sentinel attributes.
authorSerhiy Storchaka <storchaka@gmail.com>
Wed, 11 Jan 2017 18:16:44 +0000 (20:16 +0200)
committerSerhiy Storchaka <storchaka@gmail.com>
Wed, 11 Jan 2017 18:16:44 +0000 (20:16 +0200)
Doc/library/unittest.mock.rst

index ef30c01b99f77f43afece091b98972a9f16c7e8d..4b9dac402f961918c5aa471a13aa5e7b373a8ade 100644 (file)
@@ -1795,6 +1795,9 @@ sentinel
     the same attribute will always return the same object. The objects
     returned have a sensible repr so that test failure messages are readable.
 
+    The ``sentinel`` attributes don't preserve their identity when they are
+    :mod:`copied <copy>` or :mod:`pickled <pickle>`.
+
 Sometimes when testing you need to test that a specific object is passed as an
 argument to another method, or returned. It can be common to create named
 sentinel objects to test this. :data:`sentinel` provides a convenient way of