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