Capture output from test run of policy generator

Without this you just get a very unhelpful error message along the
lines of '0 != 2'. Including the output of the command in the failure
message makes it much easier to debug.

Change-Id: Ie0694f8c1b84279dd6dd3e79eaad060fa789b95a
This commit is contained in:
Ben Nemec 2020-01-15 17:33:46 +00:00
parent 28a1da6c74
commit 1db57944d5
1 changed files with 2 additions and 2 deletions

View File

@ -243,5 +243,5 @@ class GeneratePolicyFileTestCase(unit.TestCase):
stdout=subprocess.PIPE,
stderr=subprocess.PIPE
)
ret_val.communicate()
self.assertEqual(ret_val.returncode, 0)
output = ret_val.communicate()
self.assertEqual(ret_val.returncode, 0, output)