Skip to content

Commit

Permalink
Backport-specific code coverage fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
cjw296 committed Mar 3, 2025
1 parent 9081bbe commit aee44ed
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions mock/mock.py
Original file line number Diff line number Diff line change
Expand Up @@ -2310,7 +2310,7 @@ def __get__(self, obj, _type=None):
try:
_CODE_SIG = inspect.signature(partial(CodeType.__init__, None))
_CODE_ATTRS = dir(CodeType)
except ValueError:
except ValueError: # pragma: no cover - backport is only tested against builds with docstrings
_CODE_SIG = None


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

0 comments on commit aee44ed

Please sign in to comment.