221
221
retcode, actual_output, actual_error = method(test_case,
225
self._check_output(output, actual_output, test_case)
226
except AssertionError, e:
227
raise AssertionError(str(e) + " in stdout of command %s" % cmd)
229
self._check_output(error, actual_error, test_case)
230
except AssertionError, e:
231
raise AssertionError(str(e) +
232
" in stderr of running command %s" % cmd)
224
self._check_output(output, actual_output, test_case)
225
self._check_output(error, actual_error, test_case)
233
226
if retcode and not error and actual_error:
234
227
test_case.fail('In \n\t%s\nUnexpected error: %s'
235
228
% (' '.join(cmd), actual_error))
236
229
return retcode, actual_output, actual_error
238
231
def _check_output(self, expected, actual, test_case):
242
elif expected == '...\n':
245
test_case.fail('expected output: %r, but found nothing'
247
expected = expected or ''
233
# Specifying None means: any output is accepted
236
test_case.fail('We expected output: %r, but found None'
248
238
matching = self.output_checker.check_output(
249
239
expected, actual, self.check_options)