221
221
retcode, actual_output, actual_error = method(test_case,
224
self._check_output(output, actual_output, test_case)
225
self._check_output(error, actual_error, 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)
226
233
if retcode and not error and actual_error:
227
234
test_case.fail('In \n\t%s\nUnexpected error: %s'
228
235
% (' '.join(cmd), actual_error))
229
236
return retcode, actual_output, actual_error
231
238
def _check_output(self, expected, actual, test_case):
233
# Specifying None means: any output is accepted
236
test_case.fail('We expected output: %r, but found None'
242
elif expected == '...\n':
245
test_case.fail('expected output: %r, but found nothing'
247
expected = expected or ''
238
248
matching = self.output_checker.check_output(
239
249
expected, actual, self.check_options)