From f7aed20d3170ef6e1701e0088080617980e002d8 Mon Sep 17 00:00:00 2001 From: Monty Taylor Date: Tue, 23 Jul 2013 09:53:53 -0700 Subject: Loop over test output for better readability The way _run_cmd was working meant that in a test failures, the captured output was a giant blob of text with \n strings inside it, making it unreadable. By looping and printing, it becomes readable again. Change-Id: I2db3057c34e2a50f7a420f2dbcf45c6ec874b632 --- pbr/tests/__init__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pbr/tests/__init__.py b/pbr/tests/__init__.py index 14a5b5e..74e4527 100644 --- a/pbr/tests/__init__.py +++ b/pbr/tests/__init__.py @@ -113,5 +113,6 @@ class BaseTestCase(testtools.TestCase, testresources.ResourcedTestCase): stderr=subprocess.PIPE) streams = tuple(s.decode('latin1').strip() for s in p.communicate()) - print(streams) + for line in streams: + print(line) return (streams) + (p.returncode,) -- cgit v1.2.1