def test_FinishLineBuffering(self):
        """
        Test that a LineBuffer flushes everything when its iterator is
        exhausted, and itself raises StopIteration.
        """
        output = []
        input = iter(['a', 'b', 'c'])
        c = pop3._IteratorBuffer(output.extend, input, 5)
        for i in c:
            pass
        self.assertEqual(output, ['a', 'b', 'c'])

        Test that a LineBuffer flushes everything when its iterator is
        exhausted, and itself raises StopIteration.
        
stackoverflow/venv/lib/python3.6/site-packages/twisted/mail/test/test_pop3.py