]> granicus.if.org Git - python/commitdiff
Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
authorBerker Peksag <berker.peksag@gmail.com>
Wed, 7 Jan 2015 19:15:02 +0000 (21:15 +0200)
committerBerker Peksag <berker.peksag@gmail.com>
Wed, 7 Jan 2015 19:15:02 +0000 (21:15 +0200)
Patch by A.M. Kuchling.

Doc/library/unittest.mock.rst

index f92353cdbf3fba8970015f0fe3060ba86c4efc1c..b242438cf48151aeaae38ebe04d403774108ef34 100644 (file)
@@ -1678,9 +1678,10 @@ For example:
    >>> 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