Kaydet (Commit) 283f1aa8 authored tarafından Berker Peksag's avatar Berker Peksag

Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.

Patch by A.M. Kuchling.
üst b9fdb7a4
...@@ -1678,9 +1678,10 @@ For example: ...@@ -1678,9 +1678,10 @@ For example:
>>> object() in mock >>> object() in mock
False False
The two equality method, :meth:`__eq__` and :meth:`__ne__`, are special. The two equality methods, :meth:`__eq__` and :meth:`__ne__`, are special.
They do the default equality comparison on identity, using a side They do the default equality comparison on identity, using the
effect, unless you change their return value to return something else: :attr:`~Mock.side_effect` attribute, unless you change their return value to
return something else::
>>> MagicMock() == 3 >>> MagicMock() == 3
False False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment