def test_addbasic_false(self):
     model, options, parameters, data, covariance, rejected, chain, s2chain, sschain = gf.setup_mcmc_case_dr(
     )
     DR = DelayedRejection()
     DR._initialize_dr_metrics(options)
     RS = ResultsStructure()
     self.assertFalse(RS.add_dram(drscale=options.drscale,
                                  RDR=covariance._RDR,
                                  total_rejected=rejected['total'],
                                  drsettings=DR),
                      msg='basic features not added to result structure')
 def test_addbasic_true(self):
     model, options, parameters, data, covariance, rejected, chain, s2chain, sschain = gf.setup_mcmc_case_dr(
     )
     covariance._RDR = np.random.random_sample(size=(2, 2))
     DR = DelayedRejection()
     DR._initialize_dr_metrics(options)
     DR.dr_step_counter = 12000
     RS = ResultsStructure()
     RS.add_basic(nsimu=options.nsimu,
                  covariance=covariance,
                  parameters=parameters,
                  rejected=rejected,
                  simutime=0.001,
                  theta=chain[-1, :])
     self.assertTrue(RS.add_dram(drscale=options.drscale,
                                 RDR=covariance._RDR,
                                 total_rejected=rejected['total'],
                                 drsettings=DR),
                     msg='basic features added to result structure')
     self.assertTrue(np.array_equal(RS.results['RDR'], covariance._RDR),
                     msg='RDR matches')
     self.assertEqual(RS.results['alpha_count'],
                      DR.dr_step_counter,
                      msg='Alpha count matches dr step counter')