← Back to team overview

launchpad-reviewers team mailing list archive

[Merge] ~pappacena/turnip:py3-func-test-cmd-output into turnip:master

 

Thiago F. Pappacena has proposed merging ~pappacena/turnip:py3-func-test-cmd-output into turnip:master.

Commit message:
Convert command output to text before adding it as test detail

Requested reviews:
  Launchpad code reviewers (launchpad-reviewers)

For more details, see:
https://code.launchpad.net/~pappacena/turnip/+git/turnip/+merge/391235
-- 
Your team Launchpad code reviewers is requested to review the proposed merge of ~pappacena/turnip:py3-func-test-cmd-output into turnip:master.
diff --git a/turnip/pack/tests/test_functional.py b/turnip/pack/tests/test_functional.py
index f652a12..c06c4e2 100644
--- a/turnip/pack/tests/test_functional.py
+++ b/turnip/pack/tests/test_functional.py
@@ -158,8 +158,8 @@ class FunctionalTestMixin(WithScenarios):
         out, err, code = yield utils.getProcessOutputAndValue(
             command[0], command[1:], env=os.environ, path=path)
         if code != 0:
-            self.addDetail('stdout', text_content(out))
-            self.addDetail('stderr', text_content(err))
+            self.addDetail('stdout', text_content(six.ensure_text(out)))
+            self.addDetail('stderr', text_content(six.ensure_text(err)))
             self.assertEqual(0, code)
         defer.returnValue(out)
 
@@ -173,8 +173,8 @@ class FunctionalTestMixin(WithScenarios):
         out, err, code = yield utils.getProcessOutputAndValue(
             command[0], command[1:], env=os.environ, path=path)
         if code == 0:
-            self.addDetail('stdout', text_content(out))
-            self.addDetail('stderr', text_content(err))
+            self.addDetail('stdout', text_content(six.ensure_text(out)))
+            self.addDetail('stderr', text_content(six.ensure_text(err)))
             self.assertNotEqual(0, code)
         defer.returnValue((out, err))