image-download: tests to catch stray output
Add unit tests to ensure that any stray output (eg print statements) during image-download cause a test failure. Regression test for bug 1488914. Change-Id: Ic19ba5693d059bf7c283702e7c333672a878a1a1 Partial-bug: 1488914
This commit is contained in:
@@ -283,10 +283,8 @@ def save_image(data, path):
|
||||
:param path: path to save the image to
|
||||
"""
|
||||
if path is None:
|
||||
if six.PY3:
|
||||
image = sys.stdout.buffer
|
||||
else:
|
||||
image = sys.stdout
|
||||
image = getattr(sys.stdout, 'buffer',
|
||||
sys.stdout)
|
||||
else:
|
||||
image = open(path, 'wb')
|
||||
try:
|
||||
|
||||
Reference in New Issue
Block a user