diff options
author | Vegard Stikbakke <vegard.stikbakke@gmail.com> | 2020-01-25 16:44:46 +0100 |
---|---|---|
committer | Chris Withers <chris@withers.org> | 2020-01-25 15:44:46 +0000 |
commit | aef7dc89879d099dc704bd8037b8a7686fb72838 (patch) | |
tree | 90685ced511b41f37ea6fc5d6d4eb12f2b7c6575 /Lib/unittest/mock.py | |
parent | 9bfb4a7061a3bc4fc5632bccfdf9ed61f62679f7 (diff) | |
download | cpython-git-aef7dc89879d099dc704bd8037b8a7686fb72838.tar.gz |
bpo-38932: Mock fully resets child objects on reset_mock(). (GH-17409)
Diffstat (limited to 'Lib/unittest/mock.py')
-rw-r--r-- | Lib/unittest/mock.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py index a97542a2dd..beed717522 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -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: |