Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
def test_subtype():
assert len({subtype(List[int]), subtype(List[int])}) == 1
assert len({subtype(List[bool]), subtype(List[int])}) == 2
assert issubclass(int, subtype(Union[int, float]))
assert issubclass(Union[float, int], subtype(Union[int, float]))
assert issubclass(List[bool], subtype(List[int]))
assert not issubclass(Tuple[int], subtype(Tuple[int, float]))
assert issubclass(Iterable[bool], subtype(Iterable[int]))
assert issubclass(subtype(Iterable[int]), subtype(Iterable))
assert issubclass(subtype(List[int]), subtype(Iterable))
assert get_type(0) is int
assert not isinstance(get_type(iter('')), subtype)
assert get_type(()) is tuple
assert get_type((0, 0.0)) == subtype(tuple, int, float)
assert get_type([]) is list
assert get_type([0, 0.0]) == subtype(list, int)
assert get_type({}) is dict
assert get_type({' ': 0}) == subtype(dict, str, int)
def test_subtype():
assert len({subtype(List[int]), subtype(List[int])}) == 1
assert len({subtype(List[bool]), subtype(List[int])}) == 2
assert issubclass(int, subtype(Union[int, float]))
assert issubclass(Union[float, int], subtype(Union[int, float]))
assert issubclass(List[bool], subtype(List[int]))
assert not issubclass(Tuple[int], subtype(Tuple[int, float]))
assert issubclass(Iterable[bool], subtype(Iterable[int]))
assert issubclass(subtype(Iterable[int]), subtype(Iterable))
assert issubclass(subtype(List[int]), subtype(Iterable))
assert get_type(0) is int
assert not isinstance(get_type(iter('')), subtype)
assert get_type(()) is tuple
assert get_type((0, 0.0)) == subtype(tuple, int, float)
assert get_type([]) is list
assert get_type([0, 0.0]) == subtype(list, int)
assert get_type({}) is dict
assert len({subtype(List[int]), subtype(List[int])}) == 1
assert len({subtype(List[bool]), subtype(List[int])}) == 2
assert issubclass(int, subtype(Union[int, float]))
assert issubclass(Union[float, int], subtype(Union[int, float]))
assert issubclass(List[bool], subtype(List[int]))
assert not issubclass(Tuple[int], subtype(Tuple[int, float]))
assert issubclass(Iterable[bool], subtype(Iterable[int]))
assert issubclass(subtype(Iterable[int]), subtype(Iterable))
assert issubclass(subtype(List[int]), subtype(Iterable))
assert get_type(0) is int
assert not isinstance(get_type(iter('')), subtype)
assert get_type(()) is tuple
assert get_type((0, 0.0)) == subtype(tuple, int, float)
assert get_type([]) is list
assert get_type([0, 0.0]) == subtype(list, int)
assert get_type({}) is dict
assert get_type({' ': 0}) == subtype(dict, str, int)
def test_subtype():
assert len({subtype(List[int]), subtype(List[int])}) == 1
assert len({subtype(List[bool]), subtype(List[int])}) == 2
assert issubclass(int, subtype(Union[int, float]))
assert issubclass(Union[float, int], subtype(Union[int, float]))
assert issubclass(List[bool], subtype(List[int]))
assert not issubclass(Tuple[int], subtype(Tuple[int, float]))
assert issubclass(Iterable[bool], subtype(Iterable[int]))
assert issubclass(subtype(Iterable[int]), subtype(Iterable))
assert issubclass(subtype(List[int]), subtype(Iterable))
assert get_type(0) is int
assert not isinstance(get_type(iter('')), subtype)
assert get_type(()) is tuple
assert get_type((0, 0.0)) == subtype(tuple, int, float)
assert get_type([]) is list
assert get_type([0, 0.0]) == subtype(list, int)
assert get_type({}) is dict
assert get_type({' ': 0}) == subtype(dict, str, int)
def test_subtype():
assert len({subtype(List[int]), subtype(List[int])}) == 1
assert len({subtype(List[bool]), subtype(List[int])}) == 2
assert issubclass(int, subtype(Union[int, float]))
assert issubclass(Union[float, int], subtype(Union[int, float]))
assert issubclass(List[bool], subtype(List[int]))
assert not issubclass(Tuple[int], subtype(Tuple[int, float]))
assert issubclass(Iterable[bool], subtype(Iterable[int]))
assert issubclass(subtype(Iterable[int]), subtype(Iterable))
assert issubclass(subtype(List[int]), subtype(Iterable))
assert get_type(0) is int
assert not isinstance(get_type(iter('')), subtype)
assert get_type(()) is tuple
assert get_type((0, 0.0)) == subtype(tuple, int, float)
assert get_type([]) is list
assert get_type([0, 0.0]) == subtype(list, int)
assert get_type({}) is dict
assert get_type({' ': 0}) == subtype(dict, str, int)
def test_subtype():
assert len({subtype(List[int]), subtype(List[int])}) == 1
assert len({subtype(List[bool]), subtype(List[int])}) == 2
assert issubclass(int, subtype(Union[int, float]))
assert issubclass(Union[float, int], subtype(Union[int, float]))
assert issubclass(List[bool], subtype(List[int]))
assert not issubclass(Tuple[int], subtype(Tuple[int, float]))
assert issubclass(Iterable[bool], subtype(Iterable[int]))
assert issubclass(subtype(Iterable[int]), subtype(Iterable))
assert issubclass(subtype(List[int]), subtype(Iterable))
assert get_type(0) is int
assert not isinstance(get_type(iter('')), subtype)
assert get_type(()) is tuple
assert get_type((0, 0.0)) == subtype(tuple, int, float)
assert get_type([]) is list
assert get_type([0, 0.0]) == subtype(list, int)
assert get_type({}) is dict
assert get_type({' ': 0}) == subtype(dict, str, int)