Exemplo n.º 1
0
def test_is_int_char():
    ## GIVEN a string with a character
    a = "b"
    ## WHEN checking if integer
    res = isfloat(a)
    ## THEN assert it is not a integer
    assert res is False
Exemplo n.º 2
0
def test_is_float_float():
    ## GIVEN a string with a float
    a = "1.2"
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is a float
    assert res is True
Exemplo n.º 3
0
def test_is_float_empty():
    ## GIVEN a empty string
    a = ""
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is not a float
    assert res is False
Exemplo n.º 4
0
def test_is_float_char():
    ## GIVEN a string with a non number
    a = "b"
    ## WHEN checking if float
    res = isfloat(a)
    ## THEN assert it is not a float
    assert res is False