run-tests: flush output stream before prompting to accept changes
authorMatt Harbison <matt_harbison@yahoo.com>
Sat, 29 Sep 2018 20:33:52 -0400
changeset 39914 0f8ff3ff5d5c
parent 39913 d70e620ee8c9
child 39915 6e2c8f7f894e
run-tests: flush output stream before prompting to accept changes With py3 on Windows, the prompt to accept changes in an --interactive run wasn't showing up until after the choice was read from stdin.
tests/run-tests.py
--- a/tests/run-tests.py	Sun Sep 30 05:52:42 2018 +0530
+++ b/tests/run-tests.py	Sat Sep 29 20:33:52 2018 -0400
@@ -1875,6 +1875,7 @@
                         'changes)')
                 else:
                     self.stream.write('Accept this change? [n] ')
+                    self.stream.flush()
                     answer = sys.stdin.readline().strip()
                     if answer.lower() in ('y', 'yes'):
                         if test.path.endswith(b'.t'):