Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
283f1aa8
Commit
283f1aa8
authored
Jan 07, 2015
by
Berker Peksag
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #20487: Clarify meaning of "side effect" in the magic mock documentation.
Patch by A.M. Kuchling.
parent
b9fdb7a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
Doc/library/unittest.mock.rst
Doc/library/unittest.mock.rst
+4
-3
No files found.
Doc/library/unittest.mock.rst
View file @
283f1aa8
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment