diff options
author | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-11 18:17:34 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2017-01-11 18:17:34 (GMT) |
commit | 3159b33a956141c209113c4be99fe82b60024dd1 (patch) | |
tree | 8a02a5df98be81b4804c8cd1d438c6f9fc83359a /Doc | |
parent | a861d48817e2477cd0b5189787d071ff01dbe4f7 (diff) | |
parent | 87006a3d4a6c7616ab885ae697ae60a2f62e2d7a (diff) | |
download | cpython-3159b33a956141c209113c4be99fe82b60024dd1.zip cpython-3159b33a956141c209113c4be99fe82b60024dd1.tar.gz cpython-3159b33a956141c209113c4be99fe82b60024dd1.tar.bz2 |
Merge with 3.5.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/unittest.mock.rst | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 3cc22fd..c6d0ec9 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1831,6 +1831,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 |