提交 67804026 编写于 作者: C Cleber Rosa

selftests/functional/test_output.py: use command output as text

Instead of as bytes in assertions, specially because of a part of it
is going to be used as a path.  This fixes the following issue:

    ======================================================================
    ERROR: test_default_enabled_plugins (test_output.OutputPluginTest)
    ----------------------------------------------------------------------
    Traceback (most recent call last):
      File "/home/cleber/src/avocado/avocado/selftests/functional/test_output.py", line 509, in test_default_enabled_plugins
        self.check_output_files(debug_log)
      File "/home/cleber/src/avocado/avocado/selftests/functional/test_output.py", line 286, in check_output_files
        json_output_path = os.path.join(base_dir, 'results.json')
      File "/usr/lib64/python3.6/posixpath.py", line 92, in join
        genericpath._check_arg_types('join', a, *p)
      File "/usr/lib64/python3.6/genericpath.py", line 151, in _check_arg_types
        raise TypeError("Can't mix strings and bytes in path components") from None
    TypeError: Can't mix strings and bytes in path components
Signed-off-by: NCleber Rosa <crosa@redhat.com>
上级 840389cb
......@@ -493,7 +493,7 @@ class OutputPluginTest(unittest.TestCase):
cmd_line = ('%s run --job-results-dir %s --sysinfo=off '
'passtest.py' % (AVOCADO, self.tmpdir))
result = process.run(cmd_line, ignore_status=True)
output = result.stdout + result.stderr
output = result.stdout_text + result.stderr_text
expected_rc = exit_codes.AVOCADO_ALL_OK
self.assertEqual(result.exit_status, expected_rc,
"Avocado did not return rc %d:\n%s" %
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册