Пример #1
0
def test_nested_generics():
    assert is_subtype(Tuple[List[float]], Tuple[list])
Пример #2
0
def test_basic_type():
    assert is_subtype(bool, int)
Пример #3
0
def test_tuple():
    assert is_subtype(Tuple[str, bool], tuple)
Пример #4
0
def test_mismatched_generic_mapping():
    assert not is_subtype(Dict[int, str], Dict[int, float])
Пример #5
0
def test_generic_mapping():
    assert is_subtype(Dict[int, str], dict)
Пример #6
0
def test_generic_iterable():
    assert is_subtype(List[int], list)
Пример #7
0
def test_typing_type():
    assert is_subtype(list, List)