Exemple #1
0
def test_string_to_string():
    assert su.value_to_string('abc') == 'abc'
Exemple #2
0
def test_small_float_to_string():
    assert su.value_to_string(0.0000000123456) == '1.235e-08'
Exemple #3
0
def test_negative_float_to_string():
    assert su.value_to_string(-12.345678) == '-12.346'
Exemple #4
0
def test_large_float_to_string():
    assert su.value_to_string(123456.7890) == '1.235e+05'
Exemple #5
0
def test_long_float_to_string_high_prec():
    assert su.value_to_string(12.3456789, precision=5) == '12.34568'
Exemple #6
0
def test_long_float_to_string():
    assert su.value_to_string(12.3456789) == '12.346'
Exemple #7
0
def test_float_to_string():
    assert su.value_to_string(12.34) == '12.34'
Exemple #8
0
def test_int_to_string():
    assert su.value_to_string(3) == '3'