Skip to content

Commit 028ad40

Browse files
danchrdnozay
authored andcommitted
flush output stream after writing
This should make Jenkins print the output immediately, rather than as chunks.
1 parent d6d8734 commit 028ad40

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

xmlrunner/result.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,9 @@ def callback():
233233
)
234234
elif self.dots:
235235
self.stream.write(short_str)
236+
237+
self.stream.flush()
238+
236239
self.callback = callback
237240

238241
def startTest(self, test):
@@ -245,6 +248,7 @@ def startTest(self, test):
245248
if self.showAll:
246249
self.stream.write(' ' + self.getDescription(test))
247250
self.stream.write(" ... ")
251+
self.stream.flush()
248252

249253
def _setupStdout(self):
250254
"""
@@ -364,6 +368,7 @@ def printErrorList(self, flavour, errors):
364368
)
365369
self.stream.writeln(self.separator2)
366370
self.stream.writeln('%s' % test_info.get_error_info())
371+
self.stream.flush()
367372

368373
def _get_info_by_testcase(self):
369374
"""

0 commit comments

Comments
 (0)