diff --git a/mock/mock.py b/mock/mock.py index 4bd5b1e4..fba26bd2 100644 --- a/mock/mock.py +++ b/mock/mock.py @@ -3064,9 +3064,7 @@ class ThreadingMixin(Base): DEFAULT_TIMEOUT = None def _get_child_mock(self, **kw): - if "timeout" in kw: - kw["timeout"] = kw.pop("timeout") - elif isinstance(kw.get("parent"), ThreadingMixin): + if isinstance(kw.get("parent"), ThreadingMixin): kw["timeout"] = kw["parent"]._mock_wait_timeout elif isinstance(kw.get("_new_parent"), ThreadingMixin): kw["timeout"] = kw["_new_parent"]._mock_wait_timeout