mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-10 05:51:52 +08:00
Add the (deprecated) assertDictContainsSubset() to TestCase. (#3437)
Until this is removed from the standard library, it probably should stay in the typing. Also update both 2 and 3 definitions to use Mapping[Any, Any], rather than Dict[Any, Any].
This commit is contained in:
committed by
Jelle Zijlstra
parent
047caa9096
commit
99a6fb3108
@@ -3,8 +3,8 @@
|
||||
# Based on http://docs.python.org/2.7/library/unittest.html
|
||||
|
||||
from typing import (Any, Callable, Dict, FrozenSet, Iterable, Iterator,
|
||||
List, NoReturn, Optional, overload, Pattern, Sequence, Set,
|
||||
Text, TextIO, Tuple, Type, TypeVar, Union)
|
||||
List, Mapping, NoReturn, Optional, overload, Pattern,
|
||||
Sequence, Set, Text, TextIO, Tuple, Type, TypeVar, Union)
|
||||
from abc import abstractmethod, ABCMeta
|
||||
import datetime
|
||||
import types
|
||||
@@ -166,7 +166,10 @@ class TestCase(Testable):
|
||||
def assertRegexpMatches(self, text: Text, regexp: _Regexp, msg: object = ...) -> None: ...
|
||||
def assertNotRegexpMatches(self, text: Text, regexp: _Regexp, msg: object = ...) -> None: ...
|
||||
def assertItemsEqual(self, first: Iterable[Any], second: Iterable[Any], msg: object = ...) -> None: ...
|
||||
def assertDictContainsSubset(self, expected: Dict[Any, Any], actual: Dict[Any, Any], msg: object = ...) -> None: ...
|
||||
def assertDictContainsSubset(self,
|
||||
expected: Mapping[Any, Any],
|
||||
actual: Mapping[Any, Any],
|
||||
msg: object = ...) -> None: ...
|
||||
def addTypeEqualityFunc(self, typeobj: type, function: Callable[..., None]) -> None: ...
|
||||
@overload
|
||||
def failUnlessRaises(self, exception: _ExceptionType, callable: Callable[..., Any], *args: Any, **kwargs: Any) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user