diff --git a/avocado/utils/astring.py b/avocado/utils/astring.py index 17f0de567b5b9b3ed88e64bc592cd48377a33ac1..f8d34d61da42a80332b30a93297d50e15cd6619b 100644 --- a/avocado/utils/astring.py +++ b/avocado/utils/astring.py @@ -302,7 +302,7 @@ def is_text(data): each character. """ if sys.version_info[0] < 3: - return isinstance(data, unicode) + return isinstance(data, unicode) # pylint: disable=E0602 return isinstance(data, str) diff --git a/selftests/unit/test_utils_process.py b/selftests/unit/test_utils_process.py index c79ab7fc9f8e044918e24335570989bf00b77224..add9a471a6aef2aeb60f64306108e2e03d589d68 100644 --- a/selftests/unit/test_utils_process.py +++ b/selftests/unit/test_utils_process.py @@ -172,6 +172,7 @@ class TestProcessRun(unittest.TestCase): p = process.run(cmd='ls -l', ignore_status=True) self.assertEqual(p.command, expected_command) + @unittest.skipUnless(os.path.exists('/bin/sudo')) @mock.patch.object(path, 'find_command', mock.Mock(return_value='/bin/sudo')) @mock.patch.object(os, 'getuid', mock.Mock(return_value=1000))