mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +00:00
bpo-38932: Mock fully resets child objects on reset_mock(). (GH-17409)
This commit is contained in:
parent
9bfb4a7061
commit
aef7dc8987
3 changed files with 15 additions and 2 deletions
|
@ -592,7 +592,7 @@ class NonCallableMock(Base):
|
|||
for child in self._mock_children.values():
|
||||
if isinstance(child, _SpecState) or child is _deleted:
|
||||
continue
|
||||
child.reset_mock(visited)
|
||||
child.reset_mock(visited, return_value=return_value, side_effect=side_effect)
|
||||
|
||||
ret = self._mock_return_value
|
||||
if _is_instance_mock(ret) and ret is not self:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue