diff options
author | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-13 18:21:26 -0400 |
---|---|---|
committer | Jake Hunsaker <jhunsake@redhat.com> | 2020-04-21 11:34:28 -0400 |
commit | b1d1f30132a8719d2bdff3c1c25a0b183b094c82 (patch) | |
tree | 656894bedec30aabde4325e80fac6c95b2e12c60 /tests/utilities_tests.py | |
parent | 0766cc739d424932e18c250c88f0227da06ecaed (diff) | |
download | sos-b1d1f30132a8719d2bdff3c1c25a0b183b094c82.tar.gz |
[tests] Fix unittests
Fixes a unittest failure due to an attempt to pass print() a `file`
keyword for Red Hat, which is no longer accepted in python3
Additionally fixes 2 string related errors in the test suite since
changing from python2 to python3.
Signed-off-by: Jake Hunsaker <jhunsake@redhat.com>
Diffstat (limited to 'tests/utilities_tests.py')
-rw-r--r-- | tests/utilities_tests.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/utilities_tests.py b/tests/utilities_tests.py index 3513f42c..fa861563 100644 --- a/tests/utilities_tests.py +++ b/tests/utilities_tests.py @@ -19,7 +19,7 @@ TEST_DIR = os.path.dirname(__file__) class GrepTest(unittest.TestCase): def test_file_obj(self): - test_s = "\n".join(['this is only a test', 'there are only two lines']) + test_s = u"\n".join(['this is only a test', 'there are only two lines']) test_fo = StringIO(test_s) matches = grep(".*test$", test_fo) self.assertEquals(matches, ['this is only a test\n']) |