def test_simple_iter_dnf(self):
    'Test basic expression iter_dnf_clauses functionality.'
    b = BooleanExpression('(A and B) or (C and D) or (E and F)')
    self.assertTrue(b.is_dnf)
    self.assertFalse(b.is_cnf)
    clauses = b.iter_dnf_clauses()
    self.assertEqual(repr(next(clauses)), '<BooleanExpression "A and B">')
    self.assertEqual(repr(next(clauses)), '<BooleanExpression "C and D">')
    self.assertEqual(repr(next(clauses)), '<BooleanExpression "E and F">')
    with self.assertRaises(StopIteration):
        next(clauses)
Test basic expression iter_dnf_clauses functionality.
def test_simple_iter_dnf(self):
    
    b = BooleanExpression('(A and B) or (C and D) or (E and F)')
    self.assertTrue(b.is_dnf)
    self.assertFalse(b.is_cnf)
    clauses = b.iter_dnf_clauses()
    self.assertEqual(repr(next(clauses)), '<BooleanExpression "A and B">')
    self.assertEqual(repr(next(clauses)), '<BooleanExpression "C and D">')
    self.assertEqual(repr(next(clauses)), '<BooleanExpression "E and F">')
    with self.assertRaises(StopIteration):
        next(clauses)