run-tests: don't print progress from Test when in unittest mode
authorGregory Szorc <gregory.szorc@gmail.com>
Sun, 20 Apr 2014 14:04:37 -0700
changeset 21440 ece127734db1
parent 21439 2e22954b97e3
child 21441 213339e9bada
run-tests: don't print progress from Test when in unittest mode unittest does its own printing of progress indicators as part of TestResult. So, there is no need to print them when running in unittest mode. This will fix the double output of progress indicators that had been occurring in unittest mode.
tests/run-tests.py
--- a/tests/run-tests.py	Sun Apr 20 13:04:19 2014 -0700
+++ b/tests/run-tests.py	Sun Apr 20 14:04:37 2014 -0700
@@ -494,7 +494,9 @@
 
         vlog("# Ret was:", ret)
 
-        if not options.verbose:
+        # Don't print progress in unittest mode because that is handled
+        # by TestResult.
+        if not options.verbose and not self._unittest:
             iolock.acquire()
             sys.stdout.write(res[0])
             sys.stdout.flush()