test_api_base: use stdout for progress bar
authorArtem Bityutskiy <artem.bityutskiy@intel.com>
Mon, 17 Dec 2012 16:21:11 +0000 (18:21 +0200)
committerArtem Bityutskiy <artem.bityutskiy@intel.com>
Wed, 19 Dec 2012 09:49:03 +0000 (11:49 +0200)
Because otherwise the output is visible when runnint nosetest without -s.

Change-Id: Ifa9ec61f4fdf2679bab215b316e70afcf7a6ad15
Signed-off-by: Artem Bityutskiy <artem.bityutskiy@intel.com>
tests/test_api_base.py

index 9ee11bb..106cb26 100644 (file)
@@ -144,7 +144,7 @@ def _copy_image(image, f_dest, f_bmap, image_sha1, image_size):
     writer = BmapCopy.BmapCopy(f_image, f_dest, f_bmap, image_size)
     # Randomly decide whether we want the progress bar or not
     if bool(random.getrandbits(1)):
-        writer.set_progress_indicator(sys.stderr, None)
+        writer.set_progress_indicator(sys.stdout, None)
     writer.copy(bool(random.getrandbits(1)), bool(random.getrandbits(1)))
 
     # Compare the original file and the copy are identical