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