Skip to content

Commit

Permalink
lit: remove python2-isms
Browse files Browse the repository at this point in the history
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

llvm-svn: 298479
  • Loading branch information
modocache committed Mar 22, 2017
1 parent 07f2915 commit 600f04a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions llvm/utils/lit/tests/unit/TestRunner.py
Expand Up @@ -89,7 +89,7 @@ def test_lists(self):
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):
Expand All @@ -106,7 +106,7 @@ def test_custom(self):
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):
Expand Down

0 comments on commit 600f04a

Please sign in to comment.