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:
jkleint
2017-03-21 23:10:19 -07:00
committed by Jelle Zijlstra
parent 4ac642bd49
commit 433b1b2ebc
2 changed files with 6 additions and 6 deletions

View File

@@ -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: ...