[Python-checkins] cpython (3.4): Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
berker.peksag
python-checkins at python.org
Wed Jan 7 20:15:56 CET 2015
https://hg.python.org/cpython/rev/230a1bfb0f59
changeset: 94065:230a1bfb0f59
branch: 3.4
parent: 94053:0646eee8296a
user: Berker Peksag <berker.peksag at gmail.com>
date: Wed Jan 07 21:15:02 2015 +0200
summary:
Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
Patch by A.M. Kuchling.
files:
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
--- a/Doc/library/unittest.mock.rst
+++ b/Doc/library/unittest.mock.rst
@@ -1678,9 +1678,10 @@
>>> 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
--
Repository URL: https://hg.python.org/cpython
More information about the Python-checkins
mailing list