コード例 #1
0
def test_isfloat_returns_False_for_strings(x):
    assert not isfloat(x)
コード例 #2
0
def test_isfloat_returns_True_for_real_numbers(x):
    assert isfloat(x)
コード例 #3
0
def test_isfloat_returns_False_for_strings_example():
    assert not isfloat('45.8')
    assert not isfloat('invalid')
コード例 #4
0
def test_isfloat_returns_True_for_real_numbers_example():
    assert isfloat(-45.0)
    assert isfloat(45.8e-2)
コード例 #5
0
def test_isfloat_returns_False_for_strings(x):
    assert not isfloat(x)
コード例 #6
0
def test_isfloat_returns_False_for_strings_example():
    assert not isfloat('45.8')
    assert not isfloat('invalid')
コード例 #7
0
def test_isfloat_returns_True_for_real_numbers(x):
    assert isfloat(x)
コード例 #8
0
def test_isfloat_returns_True_for_real_numbers_example():
    assert isfloat(-45.0)
    assert isfloat(45.8e-2)