Skip to content

Commit 5532330

Browse files
miss-islingtonByteFlowing1337StanFromIreland
authored
[3.14] gh-156970: Set Mock.return_value's docstring (GH-156971) (#156982)
(cherry picked from commit e620377) Co-authored-by: Ivy Xu <fakeshadow1337@gmail.com> Co-authored-by: Stan Ulbrych <stan@python.org>
1 parent 9e97d9f commit 5532330

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/unittest/mock.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -597,7 +597,7 @@ def __set_return_value(self, value):
597597

598598
__return_value_doc = "The value to be returned when the mock is called."
599599
return_value = property(__get_return_value, __set_return_value,
600-
__return_value_doc)
600+
doc=__return_value_doc)
601601

602602

603603
@property
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Set the docstring of :attr:`unittest.mock.Mock.return_value`.

0 commit comments

Comments
 (0)