Exemple #1
0
def test_positive_int_negative_int():
    with pytest.raises(ArgumentTypeError):
        positive_int('-5')
Exemple #2
0
def test_positive_int_not_int():
    with pytest.raises(ArgumentTypeError):
        positive_int('not_an_int')
Exemple #3
0
def test_positive_int_valid():
    assert positive_int('123') == 123
Exemple #4
0
def test_positive_int_negative_int():
    with pytest.raises(ArgumentTypeError):
        positive_int('-5')
Exemple #5
0
def test_positive_int_not_int():
    with pytest.raises(ArgumentTypeError):
        positive_int('not_an_int')
Exemple #6
0
def test_positive_int_valid():
    assert positive_int('123') == 123