summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2015-01-07 19:15:02 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2015-01-07 19:15:02 (GMT)
commit283f1aa881af1c887fa90af914b51577c1b34461 (patch)
tree75cfee367354e2757f7781184de105aed1d182fa
parentb9fdb7a452c2b6f7a628118b5f695bd061b62cc8 (diff)
downloadcpython-283f1aa881af1c887fa90af914b51577c1b34461.zip
cpython-283f1aa881af1c887fa90af914b51577c1b34461.tar.gz
cpython-283f1aa881af1c887fa90af914b51577c1b34461.tar.bz2
Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
Patch by A.M. Kuchling.
-rw-r--r--Doc/library/unittest.mock.rst7
1 files changed, 4 insertions, 3 deletions
diff --git a/Doc/library/unittest.mock.rst b/Doc/library/unittest.mock.rst
index f92353c..b242438 100644
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -1678,9 +1678,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