GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||||
GeezerVison is showing github.com — Added reference for return_value in unittest.mock documentation by Tialo · Pull Request #119207 · python/cpython Conversation
|
| (if any) are reset as well. | ||
|
|
||
| .. note:: *return_value*, and :attr:`side_effect` are keyword-only | ||
| .. note:: :attr:`return_value`, and :attr:`side_effect` are keyword-only |
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Nice! Attention to detail, increases consistency.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
@encukou , LMK if I need to look for anything else.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
Both of these refer to the function arguments, so they should be marked up as such (*return_value* and *side_effect*).
But, a bit above in:
In case you want to reset *return_value* or :attr:`side_effect`
these refer to attributes of the Mock objects, and should use :attr: (return_value should be changed to use :attr:).
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Also added :attr: for return_value above |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
Thank you! |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…H-119207) (cherry picked from commit 6b80a5b) Co-authored-by: Tialo <[email protected]>
…H-119207) (cherry picked from commit 6b80a5b) Co-authored-by: Tialo <[email protected]>
|
GH-119249 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
GH-119250 is a backport of this pull request to the 3.13 branch. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…H-119207) (GH-119249) Use correct markup in unittest.mock.reset_mock documentation (GH-119207) (cherry picked from commit 6b80a5b) Co-authored-by: Tialo <[email protected]>
…H-119207) (GH-119250) Use correct markup in unittest.mock.reset_mock documentation (GH-119207) (cherry picked from commit 6b80a5b) Co-authored-by: Tialo <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.