Uh oh!
There was an error while loading. Please reload this page.
Added reference for return_value in unittest.mock documentation - #119207
Conversation
blaisep
left a comment
There was a problem hiding this comment.
Small change to improve consistency, Nice.
| (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.
Nice! Attention to detail, increases consistency.
There was a problem hiding this comment.
@encukou , LMK if I need to look for anything else.
There was a problem hiding this comment.
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:).
Tialo
commented
May 20, 2024
Also added :attr: for return_value above |
encukou
commented
May 20, 2024
Thank you! |
GH-119249 is a backport of this pull request to the 3.12 branch. |
GH-119250 is a backport of this pull request to the 3.13 branch. |
Added reference for
return_valuein documentation📚 Documentation preview 📚: https://cpython-previews--119207.org.readthedocs.build/