@pytest.mark.parametrize('is_float, value, expected', ((False, '37', '37'), (True, '37.1', '37.1')))
def test_export_default_decimal_places(is_float, value, expected):
    matrix = canmatrix.canmatrix.CanMatrix()
    frame = canmatrix.canmatrix.Frame()
    matrix.add_frame(frame)
    signal = canmatrix.canmatrix.Signal(size=32, is_float=is_float, is_signed=False, initial_value=value)
    frame.add_signal(signal)
    s = canmatrix.formats.sym.create_signal(db=matrix, signal=signal)
    start = '/d:'
    (d,) = (segment for segment in s.split() if segment.startswith(start))
    d = d[len(start):]
    assert (d == expected)
@pytest.mark.parametrize('is_float, value, expected', ((False, '37', '37'), (True, '37.1', '37.1')))
def test_export_default_decimal_places(is_float, value, expected):
    matrix = canmatrix.canmatrix.CanMatrix()
    frame = canmatrix.canmatrix.Frame()
    matrix.add_frame(frame)
    signal = canmatrix.canmatrix.Signal(size=32, is_float=is_float, is_signed=False, initial_value=value)
    frame.add_signal(signal)
    s = canmatrix.formats.sym.create_signal(db=matrix, signal=signal)
    start = '/d:'
    (d,) = (segment for segment in s.split() if segment.startswith(start))
    d = d[len(start):]
    assert (d == expected)