def test_dictionary_roundtrip(): pf = _basic_piecewise() d = pf.to_dict() _compare_piecewise(pf, PiecewiseFunction.from_dict(d))