diff options
author | Xtreak <tirkarthi@users.noreply.github.com> | 2018-12-01 10:03:54 (GMT) |
---|---|---|
committer | Victor Stinner <vstinner@redhat.com> | 2018-12-01 10:03:54 (GMT) |
commit | edeca92c84a3b08902ecdfe987cde00c7e617887 (patch) | |
tree | 965902be00aa84c99d0e7d7a0128c0625c7721d9 /Lib/unittest/mock.py | |
parent | 989052047eea7f35da0d7ca268791b2442ee1553 (diff) | |
download | cpython-edeca92c84a3b08902ecdfe987cde00c7e617887.zip cpython-edeca92c84a3b08902ecdfe987cde00c7e617887.tar.gz cpython-edeca92c84a3b08902ecdfe987cde00c7e617887.tar.bz2 |
bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302)
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 a9c82dc..9547b1a 100644 --- a/Lib/unittest/mock.py +++ b/Lib/unittest/mock.py @@ -542,7 +542,7 @@ class NonCallableMock(Base): self._mock_side_effect = None for child in self._mock_children.values(): - if isinstance(child, _SpecState): + if isinstance(child, _SpecState) or child is _deleted: continue child.reset_mock(visited) |