def test_create_beysian_object(self):
     raised = False
     try:
         mysprinkler = Bayesian.bayesian_sprinkler()
     except:
         raised = True
     self.assertFalse(raised, 'Exception raised')
 def test_summing_out_TFT(self):
     mysprinkler = Bayesian.bayesian_sprinkler()
     #    mask = mysprinkler.makeMask(sprinkler=True, rain=False, wetGrass=None)
     mask, removed = mysprinkler.makeMask(True, False, True)
     self.assertEqual(mysprinkler.pIsWet(mask, removed), 0.9)
 def test_create_mask_TTT(self):
     mysprinkler = Bayesian.bayesian_sprinkler()
     #    mask = mysprinkler.makeMask(sprinkler=True, rain=False, wetGrass=None)
     mask, removed = mysprinkler.makeMask(True, True, True)
     self.assertEqual(mask, 7)
 def test_summing_out_FNN(self):
     mysprinkler = Bayesian.bayesian_sprinkler()
     #    mask = mysprinkler.makeMask(sprinkler=True, rain=False, wetGrass=None)
     mask, removed = mysprinkler.makeMask(False, None, None)
     self.assertEqual(mysprinkler.pIsWet(mask, removed),
                      'Wetgrass must have a value (cannot be None)')