diff --git a/avocado/core/defaults.py b/avocado/core/defaults.py new file mode 100644 index 0000000000000000000000000000000000000000..b84eeb7512d14dd10eb54d061d6ce2201a32cf64 --- /dev/null +++ b/avocado/core/defaults.py @@ -0,0 +1,20 @@ +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +# See LICENSE for more details. +# +# Copyright: Red Hat Inc. 2018 +# Author: Cleber Rosa + +""" +The Avocado core defaults +""" + +#: The encoding used by default on all data input +ENCODING = 'utf-8' diff --git a/avocado/core/test.py b/avocado/core/test.py index 4ab33b4383e6375ca5ca18dd4c3f3993954ea68a..d59bf397782e06d40b82c41656338f0b8d634a6b 100644 --- a/avocado/core/test.py +++ b/avocado/core/test.py @@ -32,6 +32,7 @@ from difflib import unified_diff from six import string_types, iteritems from . import data_dir +from . import defaults from . import exceptions from . import output from . import parameters @@ -1133,7 +1134,7 @@ class SimpleTest(Test): # process.run uses shlex.split(), the self.path needs to be escaped result = process.run(self._command, verbose=True, - env=test_params) + env=test_params, encoding=defaults.ENCODING) self._log_detailed_cmd_info(result) except process.CmdError as details: