def test_update_cov_wsum_none(self):
        __, options, parameters, data = gf.setup_mcmc()
        CP = CovarianceProcedures()
        CP._initialize_covariance_settings(parameters=parameters,
                                           options=options)

        theta = np.array([2., 5.])
        CP._wsum = None
        CP._covchain = 1
        CP._meanchain = 2
        CP._qcov = 0
        CP._update_covariance_settings(parameter_set=theta)

        CPD = CP.__dict__
        self.assertEqual(CPD['_covchain'], 1, msg='_covchain unchanged.')
        self.assertEqual(CPD['_meanchain'], 2, msg='_meanchain unchanged.')
    def test_update_cov_wsum_not_none(self):
        model, options, parameters, data = gf.setup_mcmc()
        CP = CovarianceProcedures()
        CP._initialize_covariance_settings(parameters=parameters,
                                           options=options)

        theta = np.array([2., 5.])
        CP._wsum = 10
        CP._covchain = 1
        CP._meanchain = 2
        CP._qcov = 0
        CP._update_covariance_settings(parameter_set=theta)

        CPD = CP.__dict__
        self.assertEqual(CPD['_covchain'], 0, msg='_covchain = _qcov.')
        self.assertTrue(np.array_equal(CPD['_meanchain'], theta),
                        msg='_meanchain = parameter_set.')