mirror of
https://github.com/python/cpython.git
synced 2025-11-01 14:11:41 +00:00
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`.
This commit is contained in:
parent
3f9bc86c5a
commit
3e23fa71f4
1 changed files with 1 additions and 3 deletions
|
|
@ -3012,9 +3012,7 @@ class ThreadingMixin(Base):
|
||||||
DEFAULT_TIMEOUT = None
|
DEFAULT_TIMEOUT = None
|
||||||
|
|
||||||
def _get_child_mock(self, /, **kw):
|
def _get_child_mock(self, /, **kw):
|
||||||
if "timeout" in kw:
|
if isinstance(kw.get("parent"), ThreadingMixin):
|
||||||
kw["timeout"] = kw.pop("timeout")
|
|
||||||
elif isinstance(kw.get("parent"), ThreadingMixin):
|
|
||||||
kw["timeout"] = kw["parent"]._mock_wait_timeout
|
kw["timeout"] = kw["parent"]._mock_wait_timeout
|
||||||
elif isinstance(kw.get("_new_parent"), ThreadingMixin):
|
elif isinstance(kw.get("_new_parent"), ThreadingMixin):
|
||||||
kw["timeout"] = kw["_new_parent"]._mock_wait_timeout
|
kw["timeout"] = kw["_new_parent"]._mock_wait_timeout
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue