aboutsummaryrefslogtreecommitdiffstats
path: root/tests/utilities_tests.py
diff options
context:
space:
mode:
authorBryan Quigley <bryan.quigley@canonical.com>2020-04-08 13:13:25 -0700
committerBryan Quigley <bryan.quigley@canonical.com>2020-04-09 11:22:44 -0700
commit33bcb9a5de0d544abb482e06fc363e57507924b2 (patch)
tree1547bb4fa6add19180d26a3b8597fa34c1b1d6ef /tests/utilities_tests.py
parent902f1269500808c1a780eec46e2dc4f34be876fd (diff)
downloadsos-33bcb9a5de0d544abb482e06fc363e57507924b2.tar.gz
[global] Drop use of python six and other 2.X bits
Resolves: #2006 Signed-off-by: Bryan Quigley <bryan.quigley@canonical.com>
Diffstat (limited to 'tests/utilities_tests.py')
-rw-r--r--tests/utilities_tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py
index 9d8df584..3513f42c 100644
--- a/tests/utilities_tests.py
+++ b/tests/utilities_tests.py
@@ -9,8 +9,7 @@ import os.path
import unittest
# PYCOMPAT
-import six
-from six import StringIO
+from io import StringIO
from sos.utilities import grep, is_executable, sos_get_command_output, find, tail, shell_out
import sos
@@ -42,12 +41,12 @@ class TailTest(unittest.TestCase):
def test_tail(self):
t = tail("tests/tail_test.txt", 10)
- self.assertEquals(t, six.b("last line\n"))
+ self.assertEquals(t, b"last line\n")
def test_tail_too_many(self):
t = tail("tests/tail_test.txt", 200)
expected = open("tests/tail_test.txt", "r").read()
- self.assertEquals(t, six.b(expected))
+ self.assertEquals(t, str.encode(expected))
class ExecutableTest(unittest.TestCase):