From 600f04a435c6f400fd322bd7548a0e9683c90ca1 Mon Sep 17 00:00:00 2001 From: Brian Gesiak Date: Wed, 22 Mar 2017 04:23:01 +0000 Subject: [PATCH] lit: remove python2-isms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- llvm/utils/lit/tests/unit/TestRunner.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/utils/lit/tests/unit/TestRunner.py b/llvm/utils/lit/tests/unit/TestRunner.py index ed0affa28321f..79cc10f7e14d6 100644 --- a/llvm/utils/lit/tests/unit/TestRunner.py +++ b/llvm/utils/lit/tests/unit/TestRunner.py @@ -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): @@ -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):