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