mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-22 20:01:29 +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
@@ -5,8 +5,8 @@ import unittest.result
|
||||
from types import TracebackType
|
||||
from typing import (
|
||||
Any, AnyStr, Callable, Container, ContextManager, Dict, FrozenSet, Generic,
|
||||
Iterable, List, NoReturn, Optional, overload, Pattern, Sequence, Set,
|
||||
Tuple, Type, TypeVar, Union,
|
||||
Iterable, List, Mapping, NoReturn, Optional, overload, Pattern, Sequence,
|
||||
Set, Tuple, Type, TypeVar, Union,
|
||||
)
|
||||
|
||||
_E = TypeVar('_E', bound=BaseException)
|
||||
@@ -215,6 +215,10 @@ class TestCase:
|
||||
exception: Union[Type[_E], Tuple[Type[_E], ...]],
|
||||
expected_regex: Union[str, bytes, Pattern[str], Pattern[bytes]],
|
||||
msg: Any = ...) -> _AssertRaisesContext[_E]: ...
|
||||
def assertDictContainsSubset(self,
|
||||
expected: Mapping[Any, Any],
|
||||
actual: Mapping[Any, Any],
|
||||
msg: object = ...) -> None: ...
|
||||
|
||||
class FunctionTestCase(TestCase):
|
||||
def __init__(self, testFunc: Callable[[], None],
|
||||
|
||||
Reference in New Issue
Block a user