mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-29 07:06:55 +08:00
TestCase.assertSetEqual() should accept frozenset (#1063)
This declares the method to take the union of Set and FrozenSet rather than AbstractSet since that is where `difference()` (used by `assertSetEqual()`) is defined.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
from typing import (
|
||||
Any, Callable, Dict, Iterable, Iterator, List, Optional, Pattern, Sequence,
|
||||
Set, TextIO, Tuple, Type, TypeVar, Union, Generic,
|
||||
Set, FrozenSet, TextIO, Tuple, Type, TypeVar, Union, Generic,
|
||||
overload,
|
||||
)
|
||||
import logging
|
||||
@@ -131,8 +131,8 @@ class TestCase:
|
||||
msg: Any = ...) -> None: ...
|
||||
def assertTupleEqual(self, first: Tuple[Any, ...], second: Tuple[Any, ...],
|
||||
msg: Any = ...) -> None: ...
|
||||
def assertSetEqual(self, first: Set[Any], second: Set[Any],
|
||||
msg: Any = ...) -> None: ...
|
||||
def assertSetEqual(self, first: Union[Set[Any], FrozenSet[Any]],
|
||||
second: Union[Set[Any], FrozenSet[Any]], msg: Any = ...) -> None: ...
|
||||
def assertDictEqual(self, first: Dict[Any, Any], second: Dict[Any, Any],
|
||||
msg: Any = ...) -> None: ...
|
||||
def fail(self, msg: Any = ...) -> None: ...
|
||||
|
||||
Reference in New Issue
Block a user