Skip to content

Add reset_mock()'s argument's to resetall() #213

@alex-marty

Description

@alex-marty

unittest's Mock.reset_mock() method has two keyword-only arguments return_value and side_effect, allowing to reset these attributes on mocks if desired (unittest doc). However pytest-mock's mocker.resetall() doesn't have these arguments, requiring to reset mocks individually and breaking resetall()'s usefulness in that case.

The return_value and side_effect keyword-only arguments could be added to resetall() and passed to reset_mock() calls, mimicking its signature and behavior.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions