def test_is_float(): cases = [ (42.0, True), (42.000101010010101010101001010101010001011100001101101011100, True), (42, False), ('42', False), ('42.0', False), ([42], False), ([], False), (None, False), ('', False), (False, False), (True, False), ] for inp, exp in cases: obs = is_float(inp) assert exp == obs
def test_is_float(): cases = [ (42.0, True), (42.000101010010101010101001010101010001011100001101101011100, True), (42, False), ('42', False), ('42.0', False), ([42], False), ([], False), (None, False), ('', False), (False, False), (True, False), ] for inp, exp in cases: obs = is_float(inp) yield assert_equal, exp, obs
def test_is_float(): yield assert_true, is_float(42.0) yield assert_false, is_float('42.0')
def test_is_float(inp, exp): obs = is_float(inp) assert exp == obs