]> granicus.if.org Git - llvm/commitdiff
lit: remove python2-isms
authorBrian Gesiak <modocache@gmail.com>
Wed, 22 Mar 2017 04:23:01 +0000 (04:23 +0000)
committerBrian Gesiak <modocache@gmail.com>
Wed, 22 Mar 2017 04:23:01 +0000 (04:23 +0000)
Summary:
`assert.assertItemEqual` went away in Python 3. Seeing how lists
are ordered, comparing a list against each other should work just
as well.

Patch by @jbergstroem (Johan Bergström).

Reviewers: modocache, gparker42

Reviewed By: modocache

Differential Revision: https://reviews.llvm.org/D31229

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298479 91177308-0d34-0410-b5e6-96231b3b80d8

utils/lit/tests/unit/TestRunner.py

index ed0affa28321fd2a0db11f4b9a14f324b81608aa..79cc10f7e14d6e46489a91a0ae70ee95e00d8bd6 100644 (file)
@@ -89,7 +89,7 @@ class TestIntegratedTestKeywordParser(unittest.TestCase):
         parsers = self.make_parsers()
         self.parse_test(parsers)
         list_parser = self.get_parser(parsers, 'MY_LIST:')
-        self.assertItemsEqual(list_parser.getValue(),
+        self.assertEqual(list_parser.getValue(),
                               ['one', 'two', 'three', 'four'])
 
     def test_commands(self):
@@ -106,7 +106,7 @@ class TestIntegratedTestKeywordParser(unittest.TestCase):
         self.parse_test(parsers)
         custom_parser = self.get_parser(parsers, 'MY_CUSTOM:')
         value = custom_parser.getValue()
-        self.assertItemsEqual(value, ['a', 'b', 'c'])
+        self.assertEqual(value, ['a', 'b', 'c'])
 
     def test_bad_keywords(self):
         def custom_parse(line_number, line, output):