[Python-checkins] cpython (merge 3.4 -> default): 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/3cf91d2aeab3
changeset: 94066:3cf91d2aeab3
parent: 94064:15ce5fee0508
parent: 94065:230a1bfb0f59
user: Berker Peksag <berker.peksag at gmail.com>
date: Wed Jan 07 21:15:33 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
@@ -1720,9 +1720,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