tests: for consistent output flush between writing sterr and stdout
authorSimon Heimberg <simohe@besonet.ch>
Tue, 28 Jan 2014 02:23:48 +0100
changeset 20382 a82de9dc4f77
parent 20381 fff0a71f8177
child 20383 4990abb4729d
tests: for consistent output flush between writing sterr and stdout Because stdout and stderr are buffered, the order of the output is other way around on some systems.
tests/test-debugcommands.t
--- a/tests/test-debugcommands.t	Thu Feb 06 02:17:48 2014 +0100
+++ b/tests/test-debugcommands.t	Tue Jan 28 02:23:48 2014 +0100
@@ -33,15 +33,16 @@
   >     dst('hello world')
   > def g():
   >     f()
+  >     sys.stderr.flush()
   >     debugstacktrace(skip=-5, f=sys.stdout)
   > g()
   > EOF
   $ python debugstacktrace.py
   hello world at:
-   debugstacktrace.py:7 in * (glob)
+   debugstacktrace.py:8 in * (glob)
    debugstacktrace.py:5 in g
    debugstacktrace.py:3 in f
   stacktrace at:
-   debugstacktrace.py:7 *in * (glob)
-   debugstacktrace.py:6 *in g (glob)
+   debugstacktrace.py:8 *in * (glob)
+   debugstacktrace.py:7 *in g (glob)
    */util.py:* in debugstacktrace (glob)