[PATCH STABLE] test-commandserver: flush stdout

Idan Kamara idankk86 at gmail.com
Wed Feb 15 23:23:56 UTC 2012


# HG changeset patch
# User Idan Kamara <idankk86 at gmail.com>
# Date 1329348225 -7200
# Branch stable
# Node ID 7a15cae5fd706742ff1065d3f8601260b7a2ee4e
# Parent  96ed1bfd8623e4c63a5fdd690402c9218b5cb2ff
test-commandserver: flush stdout

diff --git a/tests/test-commandserver.py b/tests/test-commandserver.py
--- a/tests/test-commandserver.py
+++ b/tests/test-commandserver.py
@@ -27,6 +27,7 @@
 
 def runcommand(server, args, output=sys.stdout, error=sys.stderr, input=None):
     print ' runcommand', ' '.join(args)
+    sys.stdout.flush()
     server.stdin.write('runcommand\n')
     writeblock(server, '\0'.join(args))
 
@@ -56,6 +57,7 @@
     print
     print 'testing %s:' % func.__name__
     print
+    sys.stdout.flush()
     server = connect(repopath)
     try:
         return func(server)
diff --git a/tests/test-commandserver.py.out b/tests/test-commandserver.py.out
--- a/tests/test-commandserver.py.out
+++ b/tests/test-commandserver.py.out
@@ -4,10 +4,10 @@
 o, 'capabilities: getencoding runcommand\nencoding: ***'
  runcommand id
 000000000000 tip
-abort: unknown command unknowncommand
 
 testing unknowncommand:
 
+abort: unknown command unknowncommand
 
 testing checkruncommand:
 
@@ -134,11 +134,11 @@
 3: draft
  runcommand phase -r .
 3: public
-no phases changed
 
 testing rollback:
 
  runcommand phase -r . -p
+no phases changed
  runcommand commit -Am.
  runcommand rollback
 repository tip rolled back to revision 3 (undo commit)



More information about the Mercurial-devel mailing list