Skip to content

Commit 0da9c27

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

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
@@ -590,7 +590,7 @@ def __set_return_value(self, value):
590590

591591
__return_value_doc = "The value to be returned when the mock is called."
592592
return_value = property(__get_return_value, __set_return_value,
593-
__return_value_doc)
593+
doc=__return_value_doc)
594594

595595

596596
@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)