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