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

def test_linear_fit_fixed_parameter(self):

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