def test_entails(self):
     ind1 = Independencies([['A', 'B'], ['C', 'D'], 'E'])
     ind2 = Independencies(['A', 'C', 'E'])
     self.assertTrue(ind1.entails(ind2))
     self.assertFalse(ind2.entails(ind1))
     ind3 = Independencies(('W', ['X', 'Y', 'Z']))
     self.assertTrue(ind3.entails(ind3.closure()))
     self.assertTrue(ind3.closure().entails(ind3))
Esempio n. 2
0
 def test_entails(self):
     ind1 = Independencies([["A", "B"], ["C", "D"], "E"])
     ind2 = Independencies(["A", "C", "E"])
     self.assertTrue(ind1.entails(ind2))
     self.assertFalse(ind2.entails(ind1))
     ind3 = Independencies(("W", ["X", "Y", "Z"]))
     self.assertTrue(ind3.entails(ind3.closure()))
     self.assertTrue(ind3.closure().entails(ind3))
 def test_entails(self):
     ind1 = Independencies([['A', 'B'], ['C', 'D'], 'E'])
     ind2 = Independencies(['A', 'C', 'E'])
     self.assertTrue(ind1.entails(ind2))
     self.assertFalse(ind2.entails(ind1))
     ind3 = Independencies(('W', ['X', 'Y', 'Z']))
     self.assertTrue(ind3.entails(ind3.closure()))
     self.assertTrue(ind3.closure().entails(ind3))