示例#1
0
def test_string_component_transform_factory_with_FLOAT_and_NANLAST_returns_fast_float_with_pos_inf_replacing_nan(
):
    assert _string_component_transform_factory(ns.FLOAT | ns.NANLAST)(
        'nan') == fast_float('nan', nan=float('+inf'))
示例#2
0
def test_string_component_transform_factory_with_FLOAT_returns_fast_float(x):
    assert _string_component_transform_factory(ns.FLOAT)(
        py23_str(x)) == fast_float(py23_str(x), nan=float('-inf'))
示例#3
0
def test_string_component_transform_factory_with_FLOAT_returns_fast_float_with_neg_inf_replacing_nan(
):
    assert _string_component_transform_factory(ns.FLOAT)('nan') == fast_float(
        'nan', nan=float('-inf'))
示例#4
0
def test_string_component_transform_factory_with_FLOAT_returns_fast_float_example(
):
    x = 'hello'
    assert _string_component_transform_factory(ns.FLOAT)(x) is fast_float(x)
    assert _string_component_transform_factory(
        ns.FLOAT)('5007') == fast_float('5007')
示例#5
0
def test_post_split_function_with_FLOAT_and_NANLAST_returns_fast_float_with_pos_inf_replacing_nan():
    assert _post_split_function(ns.FLOAT | ns.NANLAST)('nan') == fast_float('nan', nan=float('+inf'))
示例#6
0
def test_post_split_function_with_FLOAT_returns_fast_float_with_neg_inf_replacing_nan():
    assert _post_split_function(ns.FLOAT)('nan') == fast_float('nan', nan=float('-inf'))
示例#7
0
def test_post_split_function_with_FLOAT_returns_fast_float(x):
    assume(x)
    assert _post_split_function(ns.FLOAT)(py23_str(x)) == fast_float(py23_str(x), nan=float('-inf'))
示例#8
0
def test_post_split_function_with_FLOAT_returns_fast_float_example():
    x = 'hello'
    assert _post_split_function(ns.FLOAT)(x) is fast_float(x)
    assert _post_split_function(ns.FLOAT)('5007') == fast_float('5007')