mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Fix assert_has_calls() signature (#3967)
See the docs https://docs.python.org/3/library/unittest.mock.html#unittest.mock.Mock.assert_has_calls
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
# Stubs for mock
|
||||
|
||||
import sys
|
||||
from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
|
||||
from typing import Any, List, Optional, Sequence, Text, Tuple, Type, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -101,7 +101,7 @@ class NonCallableMock(Base, Any): # type: ignore
|
||||
def _get_call_signature_from_name(self, name: str) -> Any: ...
|
||||
|
||||
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def assert_has_calls(self, calls: _CallList, any_order: bool = ...) -> None: ...
|
||||
def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ...
|
||||
def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ...
|
||||
def _mock_add_spec(self, spec: Any, spec_set, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ...
|
||||
def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ...
|
||||
|
||||
4
third_party/2and3/mock.pyi
vendored
4
third_party/2and3/mock.pyi
vendored
@@ -1,7 +1,7 @@
|
||||
# Stubs for mock
|
||||
|
||||
import sys
|
||||
from typing import Any, List, Optional, Text, Tuple, Type, TypeVar
|
||||
from typing import Any, List, Optional, Sequence, Text, Tuple, Type, TypeVar
|
||||
|
||||
_T = TypeVar("_T")
|
||||
|
||||
@@ -101,7 +101,7 @@ class NonCallableMock(Base, Any): # type: ignore
|
||||
def _get_call_signature_from_name(self, name: str) -> Any: ...
|
||||
|
||||
def assert_any_call(self, *args: Any, **kwargs: Any) -> None: ...
|
||||
def assert_has_calls(self, calls: _CallList, any_order: bool = ...) -> None: ...
|
||||
def assert_has_calls(self, calls: Sequence[_Call], any_order: bool = ...) -> None: ...
|
||||
def mock_add_spec(self, spec: Any, spec_set: bool = ...) -> None: ...
|
||||
def _mock_add_spec(self, spec: Any, spec_set, _spec_as_instance: bool = ..., _eat_self: bool = ...) -> None: ...
|
||||
def attach_mock(self, mock: NonCallableMock, attribute: str) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user