##// END OF EJS Templates
Don't show subprocess output if there isn't any
Thomas Kluyver -
Show More
@@ -426,12 +426,16 b' class SubprocessStreamCapturePlugin(Plugin):'
426 def formatFailure(self, test, err):
426 def formatFailure(self, test, err):
427 # Show output
427 # Show output
428 ec, ev, tb = err
428 ec, ev, tb = err
429 captured = self.stream_capturer.get_buffer().decode('utf-8', 'replace')
430 if captured.strip():
429 ev = safe_str(ev)
431 ev = safe_str(ev)
430 out = [ev, '>> begin captured subprocess output <<',
432 out = [ev, '>> begin captured subprocess output <<',
431 self.stream_capturer.get_buffer().decode('utf-8', 'replace'),
433 captured,
432 '>> end captured subprocess output <<']
434 '>> end captured subprocess output <<']
433 return ec, '\n'.join(out), tb
435 return ec, '\n'.join(out), tb
434
436
437 return err
438
435 formatError = formatFailure
439 formatError = formatFailure
436
440
437 def finalize(self, result):
441 def finalize(self, result):
General Comments 0
You need to be logged in to leave comments. Login now