Thanks to visit codestin.com Credit goes to github.com
We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 924aaae commit 87006a3Copy full SHA for 87006a3
1 file changed
Doc/library/unittest.mock.rst
@@ -1795,6 +1795,9 @@ sentinel
1795
the same attribute will always return the same object. The objects
1796
returned have a sensible repr so that test failure messages are readable.
1797
1798
+ The ``sentinel`` attributes don't preserve their identity when they are
1799
+ :mod:`copied <copy>` or :mod:`pickled <pickle>`.
1800
+
1801
Sometimes when testing you need to test that a specific object is passed as an
1802
argument to another method, or returned. It can be common to create named
1803
sentinel objects to test this. :data:`sentinel` provides a convenient way of
0 commit comments