예제 #1
0
 def test_isfixed(self):
     assert not isfixed(TypeVar('M') * int32)
예제 #2
0
def test_typevar_must_be_upper_case():
    with pytest.raises(ValueError):
        TypeVar('t')
예제 #3
0
def test_typevar_repr():
    assert repr(TypeVar('T')) == "TypeVar(symbol='T')"
예제 #4
0
def test_ellipsis_with_typevar_repr():
    assert str(Ellipsis(typevar=TypeVar('T'))) == 'T...'
    assert repr(Ellipsis(typevar=TypeVar('T'))) == 'Ellipsis(\'T...\')'