Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 283f1aa

Browse files
committed
Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
Patch by A.M. Kuchling.
1 parent b9fdb7a commit 283f1aa

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

Doc/library/unittest.mock.rst

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1678,9 +1678,10 @@ For example:
16781678
>>> object() in mock
16791679
False
16801680

1681-
The two equality method, :meth:`__eq__` and :meth:`__ne__`, are special.
1682-
They do the default equality comparison on identity, using a side
1683-
effect, unless you change their return value to return something else:
1681+
The two equality methods, :meth:`__eq__` and :meth:`__ne__`, are special.
1682+
They do the default equality comparison on identity, using the
1683+
:attr:`~Mock.side_effect` attribute, unless you change their return value to
1684+
return something else::
16841685

16851686
>>> MagicMock() == 3
16861687
False

0 commit comments

Comments
 (0)