コード例 #1
0
ファイル: test_convert.py プロジェクト: rarmisen/scout
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
コード例 #2
0
ファイル: test_convert.py プロジェクト: rarmisen/scout
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
コード例 #3
0
ファイル: test_convert.py プロジェクト: rarmisen/scout
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
コード例 #4
0
ファイル: test_convert.py プロジェクト: rarmisen/scout
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