def test_convert_list_to_string(): assert convert_list_to_string([1.1, 1.3, 1.5, 1.7], float) == "1.1..1.7,0.2" assert convert_list_to_string([1, 3, 5], int) == "1..5,2" assert convert_list_to_string([1, 3, 4], int) == "1,3,4" assert convert_list_to_string([1, 3, 4.9999], float) == "1,3,4.9999" assert convert_list_to_string([1.0, 3, 4.9999], float) == "1,3,4.9999" assert convert_list_to_string([1.001, 3, 4.9999], float) == "1.001,3,4.9999" assert convert_list_to_string([1, 3], int) == "1,3" assert convert_list_to_string([1.0, 3.0], float) == "1.0,3.0" assert convert_list_to_string([1], int) == "1" assert convert_list_to_string([1.0], float) == "1.0" assert convert_list_to_string(["1"], str) == "1" assert convert_list_to_string(["1", "2"], str) == "1,2" assert convert_list_to_string(["1", "2", "3", "4"], str) == "1,2,3,4" assert convert_list_to_string([1, 2, 3.0], float) == "1..3,1" assert convert_list_to_string([1.5, 2, 2.5], float) == "1.5..2.5,0.5"
def test_string_list_inversion_random_float(lst): assert tuple(lst) == convert_string_to_list(convert_list_to_string(lst, float), float)
def test_string_list_inversion_arithmetic_float(lst): assert tuple(lst) == convert_string_to_list(convert_list_to_string(lst, float), float)
def test_string_list_inversion_random_int(lst): lst = sorted(lst) assert tuple(lst) == convert_string_to_list(convert_list_to_string(lst, int), int)