Skip to content

Commit 3e23fa7

Browse files
authored
GH-61215: threadingmock: Remove unused branch for timeout (#106591)
threadingmock: Remove unused branch for `timeout` This is no longer needed as the mock does not hold a "timeout" parameter, the timeout is stored in `_mock_wait_timeout`.
1 parent 3f9bc86 commit 3e23fa7

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

Lib/unittest/mock.py

+1-3
Original file line numberDiff line numberDiff line change
@@ -3012,9 +3012,7 @@ class ThreadingMixin(Base):
30123012
DEFAULT_TIMEOUT = None
30133013

30143014
def _get_child_mock(self, /, **kw):
3015-
if "timeout" in kw:
3016-
kw["timeout"] = kw.pop("timeout")
3017-
elif isinstance(kw.get("parent"), ThreadingMixin):
3015+
if isinstance(kw.get("parent"), ThreadingMixin):
30183016
kw["timeout"] = kw["parent"]._mock_wait_timeout
30193017
elif isinstance(kw.get("_new_parent"), ThreadingMixin):
30203018
kw["timeout"] = kw["_new_parent"]._mock_wait_timeout

0 commit comments

Comments
 (0)