Ejemplo n.º 1
0
def test_stub_only_function(x):
    g(<warning descr="Expected type 'dict', got 'int' instead">stub_only(10)</warning>)
    g(<warning descr="Expected type 'dict', got 'str' instead">stub_only('foo')</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[int, str]' instead">stub_only(x)</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[int, str]' instead">stub_only(<warning descr="Expected type 'int', got 'Dict[int, int]' instead">{1: 2}</warning>)</warning>)
Ejemplo n.º 2
0
def test_stub_only_function(x):
    g(<warning descr="Expected type 'dict', got 'int' instead">stub_only(10)</warning>)
    g(<warning descr="Expected type 'dict', got 'str' instead">stub_only('foo')</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[str, int]' instead">stub_only(x)</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[str, int]' instead">stub_only(<warning descr="Unexpected type(s):(dict[int, int])Possible type(s):(str)(int)">{1: 2}</warning>)</warning>)
Ejemplo n.º 3
0
def test_stub_only_function(x):
    g(<warning descr="Expected type 'dict', got 'int' instead">stub_only(10)</warning>)
    g(<warning descr="Expected type 'dict', got 'str' instead">stub_only('foo')</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[int, str]' instead">stub_only(x)</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[int, str]' instead">stub_only(<warning descr="Expected type 'int', got 'Dict[int, int]' instead">{1: 2}</warning>)</warning>)
Ejemplo n.º 4
0
def test_stub_only_function(x):
    g(<warning descr="Expected type 'dict', got 'int' instead">stub_only(10)</warning>)
    g(<warning descr="Expected type 'dict', got 'str' instead">stub_only('foo')</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[int, str]' instead">stub_only(x)</warning>)
    g(<warning descr="Expected type 'dict', got 'Union[int, str]' instead">stub_only(<warning descr="Unexpected type(s):(Dict[int, int])Possible types:(str)(int)">{1: 2}</warning>)</warning>)