Skip to content

The return_value docstring is set incorrectly in unittest.mock.NonCallableMock #156970

Description

@ByteFlowing1337

Bug report

Bug description:

__return_value_doc = "The value to be returned when the mock is called."
return_value = property(__get_return_value, __set_return_value,
__return_value_doc)

Should be:

 return_value = property(__get_return_value, __set_return_value, 
                         doc=__return_value_doc)

CPython versions tested on:

CPython main branch

Operating systems tested on:

No response

Linked PRs

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    stdlibStandard Library Python modules in the Lib/ directorytype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions