diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2015-01-07 19:15:33 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2015-01-07 19:15:33 (GMT) |
commit | a65766e5ea15bdbd280a845ae54c9e371625c510 (patch) | |
tree | ba46613bf7a26fd67ebdfbea09fad11eb131aada /Doc/library/unittest.mock.rst | |
parent | 9f6eceab46729e385dde6826f38147fbed038873 (diff) | |
parent | 283f1aa881af1c887fa90af914b51577c1b34461 (diff) | |
download | cpython-a65766e5ea15bdbd280a845ae54c9e371625c510.zip cpython-a65766e5ea15bdbd280a845ae54c9e371625c510.tar.gz cpython-a65766e5ea15bdbd280a845ae54c9e371625c510.tar.bz2 |
Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
Patch by A.M. Kuchling.
Diffstat (limited to 'Doc/library/unittest.mock.rst')
-rw-r--r-- | Doc/library/unittest.mock.rst | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst index 94bb731..3043a6f 100644 --- a/Doc/library/unittest.mock.rst +++ b/Doc/library/unittest.mock.rst @@ -1720,9 +1720,10 @@ For example: >>> object() in mock False -The two equality method, :meth:`__eq__` and :meth:`__ne__`, are special. -They do the default equality comparison on identity, using a side -effect, unless you change their return value to return something else: +The two equality methods, :meth:`__eq__` and :meth:`__ne__`, are special. +They do the default equality comparison on identity, using the +:attr:`~Mock.side_effect` attribute, unless you change their return value to +return something else:: >>> MagicMock() == 3 False |