Added captureOutput helper method to pythy.TestCase.