def METHOD_NAME(numeric_type, bg_writing) -> None:
    """
    Test the saving numeric values into 'text' parameter raises an exception
    """
    p = ParamSpecBase("p", "text")
    test_set = new_data_set("test-dataset")
    test_set.set_interdependencies(InterDependencies_(standalones=(p,)))
    test_set.mark_started(start_bg_writer=bg_writing)
    idps = InterDependencies_(standalones=(p,))
    data_saver = DataSaver(
        dataset=test_set, write_period=0, interdeps=idps)
    try:
        value = numeric_type(2)
        gottype = np.array(value).dtype
        msg = re.escape(f'Parameter {p.name} is of type '
                        f'"{p.type}", but got a result of '
                        f'type {gottype} ({value}).')
        with pytest.raises(ValueError, match=msg):
            data_saver.add_result((p.name, value))
    finally:
        data_saver.dataset.mark_completed()
        data_saver.dataset.conn.close()  # type: ignore[attr-defined]