changeset 40318 | 55fd0fefbec4 |
parent 29485 | 6a98f9408a50 |
child 43076 | 2372284d9457 |
--- a/tests/heredoctest.py Tue Oct 16 08:06:17 2018 +0200 +++ b/tests/heredoctest.py Tue Oct 16 07:18:30 2018 +0200 @@ -2,6 +2,10 @@ import sys +def flush(): + sys.stdout.flush() + sys.stderr.flush() + globalvars = {} lines = sys.stdin.readlines() while lines: @@ -15,6 +19,9 @@ snippet += l[4:] c = compile(snippet, '<heredoc>', 'single') try: + flush() exec(c, globalvars) + flush() except Exception as inst: + flush() print(repr(inst))