add unittest.mock.Base to MagicMixin and MagicProxy (#12747)

This matches the runtime.
This commit is contained in:
Stephen Morton
2024-10-06 13:17:42 -07:00
committed by GitHub
parent 04f3f77ee5
commit 1a0b507ae7

View File

@@ -363,7 +363,7 @@ class _patcher:
patch: _patcher
class MagicMixin:
class MagicMixin(Base):
def __init__(self, *args: Any, **kw: Any) -> None: ...
class NonCallableMagicMock(MagicMixin, NonCallableMock): ...
@@ -393,7 +393,7 @@ class AsyncMock(AsyncMockMixin, AsyncMagicMixin, Mock):
# But, `NonCallableMock` super-class has the better version.
def reset_mock(self, visited: Any = None, *, return_value: bool = False, side_effect: bool = False) -> None: ...
class MagicProxy:
class MagicProxy(Base):
name: str
parent: Any
def __init__(self, name: str, parent: Any) -> None: ...