Skip to content

Commit aee44ed

Browse files
committed
Backport-specific code coverage fixes
1 parent 9081bbe commit aee44ed

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mock/mock.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -2310,7 +2310,7 @@ def __get__(self, obj, _type=None):
23102310
try:
23112311
_CODE_SIG = inspect.signature(partial(CodeType.__init__, None))
23122312
_CODE_ATTRS = dir(CodeType)
2313-
except ValueError:
2313+
except ValueError: # pragma: no cover - backport is only tested against builds with docstrings
23142314
_CODE_SIG = None
23152315

23162316

@@ -2335,7 +2335,7 @@ def __init__(self, *args, **kwargs):
23352335
code_mock = NonCallableMock(spec_set=_CODE_ATTRS)
23362336
code_mock.__dict__["_spec_class"] = CodeType
23372337
code_mock.__dict__["_spec_signature"] = _CODE_SIG
2338-
else:
2338+
else: # pragma: no cover - backport is only tested against builds with docstrings
23392339
code_mock = NonCallableMock(spec_set=CodeType)
23402340
code_mock.co_flags = (
23412341
inspect.CO_COROUTINE

0 commit comments

Comments
 (0)