'Tests fitting a polynomial model set with a fixed parameter (#6135).'

def test_linear_fit_model_set_fixed_parameter(self):

    init_model = models.Polynomial1D(degree=2, c1=[1, (-2)], n_models=2)
    init_model.c1.fixed = True
    x = np.arange(10)
    yy = np.array([((2 + x) + ((0.5 * x) * x)), ((-2) * x)])
    fitter = LinearLSQFitter()
    fitted_model = fitter(init_model, x, yy)
    assert_allclose(fitted_model.c0, [2.0, 0.0], atol=1e-14)
    assert_allclose(fitted_model.c1, [1.0, (-2.0)], atol=1e-14)
    assert_allclose(fitted_model.c2, [0.5, 0.0], atol=1e-14)
