Example #1
0
 def test_bad_identity(self):
     with self.assertRaises(SystemExit) as cm:
         identities = badread.identities.Identities(81.9,
                                                    5.5,
                                                    82.1,
                                                    output=self.null)
         identities.get_identity()
     self.assertTrue('invalid beta parameters' in str(cm.exception))
Example #2
0
 def test_constant_identity_3(self):
     identities = badread.identities.Identities(90,
                                                0,
                                                100,
                                                output=self.null)
     for _ in range(self.trials):
         self.assertEqual(identities.get_identity(), 0.9)
Example #3
0
 def test_beta_identity_6(self):
     identities = badread.identities.Identities(90,
                                                8,
                                                100,
                                                output=self.null)
     mean = sum(identities.get_identity()
                for _ in range(self.trials)) / self.trials
     self.assertAlmostEqual(mean, 0.9, delta=0.01)