def test_function_string_has_expected_form_with_given_values(self): test_profile = GramCharlierMassProfile(10, 16,[1,0,1],1,1) param_prefix = "f1." param_vals = {"f1.Width": 11.0, "f1.FSECoeff": 0.1, "f1.C_0": 0.25, "f1.C_2": 0.5, "f1.C_4": 0.75} expected = "name=GramCharlierComptonProfile,Mass=16.000000,HermiteCoeffs=1 0 1,"\ "Width=11.000000,FSECoeff=0.100000,C_0=0.250000,C_4=0.750000;" self.assertEqual(expected, test_profile.create_fit_function_str(param_vals, param_prefix))
def test_function_string_has_expected_form_with_no_defaults(self): test_profile = GramCharlierMassProfile(10, 16,[1,0,1],1,1) expected = "name=GramCharlierComptonProfile,Mass=16.000000,HermiteCoeffs=1 0 1,Width=10.000000;" self.assertEqual(expected, test_profile.create_fit_function_str())