summaryrefslogtreecommitdiffstats
path: root/Lib/unittest
diff options
context:
space:
mode:
authorMario Corchero <mcorcherojim@bloomberg.net>2023-07-10 13:35:54 (GMT)
committerGitHub <noreply@github.com>2023-07-10 13:35:54 (GMT)
commit3e23fa71f43fb225ca29a931644d1100e2f4d6b8 (patch)
tree914d8671305a5f97c01d2d409b6d13e671e48255 /Lib/unittest
parent3f9bc86c5a1b29fd636a53bf4150acacf60284d8 (diff)
downloadcpython-3e23fa71f43fb225ca29a931644d1100e2f4d6b8.zip
cpython-3e23fa71f43fb225ca29a931644d1100e2f4d6b8.tar.gz
cpython-3e23fa71f43fb225ca29a931644d1100e2f4d6b8.tar.bz2
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`.
Diffstat (limited to 'Lib/unittest')
-rw-r--r--Lib/unittest/mock.py4
1 files changed, 1 insertions, 3 deletions
diff --git a/Lib/unittest/mock.py b/Lib/unittest/mock.py
index 7ef7e71..3ed54b3 100644
--- a/Lib/unittest/mock.py
+++ b/Lib/unittest/mock.py
@@ -3012,9 +3012,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