Roundup Robot added the comment:
New changeset 230a1bfb0f59 by Berker Peksag in branch '3.4':
Issue #20487: Clarify meaning of side effect in the magic mock documentation.
https://hg.python.org/cpython/rev/230a1bfb0f59
New changeset 3cf91d2aeab3 by Berker Peksag in branch 'default':
Issue
Berker Peksag added the comment:
Fixed. Thank you to both Andrew and Michael.
--
resolution: - fixed
stage: patch review - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20487
Michael Foord added the comment:
Patch looks good, thanks.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20487
___
___
Python-bugs-list mailing
Berker Peksag added the comment:
Here is a patch to address msg211296.
--
keywords: +patch
nosy: +berker.peksag
stage: - patch review
type: - enhancement
versions: -Python 3.3
Added file: http://bugs.python.org/file37602/issue20487.diff
___
Python
Changes by A.M. Kuchling a...@amk.ca:
--
nosy: -akuchling
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20487
___
___
Python-bugs-list mailing
Changes by Ezio Melotti ezio.melo...@gmail.com:
--
nosy: +ezio.melotti
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20487
___
___
A.M. Kuchling added the comment:
Maybe this would be clearer if it used the keyword, i.e. using the
:attr:`~Mock.side_effect` attribute.
Also, there's a typo in the quoted text: two equality method should be
method'S'.
--
nosy: +akuchling
___
New submission from INADA Naoki:
http://docs.python.org/3.3/library/unittest.mock.html#magic-mock
The two equality method, __eq__ and __ne__, are special. They do the default
equality comparison on identity, using a side effect, unless you change their
return value to return something
Michael Foord added the comment:
A side effect is a mechanism Mock provides for mocks to have special
behaviour when called.
http://docs.python.org/3.3/library/unittest.mock.html#unittest.mock.Mock.side_effect
The term is used very widely throughout the mock documentation, so I don't
think