'The reporter\'s C{printSummary} method should print the number of
expected failures that occurred.'

def test_summary(self):

    self.result.addExpectedFailure(self.test, Failure(Exception()), makeTodo('some    reason'))
    self.result.done()
    output = self.stream.getvalue().splitlines()[(-1)]
    prefix = 'PASSED    '
    self.assertTrue(output.startswith(prefix))
    self.assertEqual(output[len(prefix):].strip(), '(expectedFailures=1)')
