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