mirror of
https://github.com/python/cpython.git
synced 2025-08-29 05:05:03 +00:00
bpo-31177: Skip deleted attributes while calling reset_mock (GH-9302)
This commit is contained in:
parent
989052047e
commit
edeca92c84
3 changed files with 13 additions and 1 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue