From b4c39c58746334912f9a89941f967e296f1e0b5b Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Tue, 16 Feb 2021 10:29:21 +0100 Subject: [PATCH] Replace assertItemsEqual with assertCountEqual assertItemsEqual was removed from Python's unittest.TestCase in Python 3.3 [1][2]. We have been able to use them since then, because testtools required unittest2, which still included it. With testtools removing Python 2.7 support [3][4], we will lose support for assertItemsEqual, so we should switch to use assertCountEqual. [1] - https://bugs.python.org/issue17866 [2] - https://hg.python.org/cpython/rev/d9921cb6e3cd [3] - testing-cabal/testtools#286 [4] - testing-cabal/testtools#277 Change-Id: I6ebd93aa093caad6f2d3db6e43beb8bc8d9cedb7 --- yaql/tests/test_strings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yaql/tests/test_strings.py b/yaql/tests/test_strings.py index 3e51189..4af8812 100644 --- a/yaql/tests/test_strings.py +++ b/yaql/tests/test_strings.py @@ -174,7 +174,7 @@ class TestStrings(yaql.tests.TestCase): self.assertEqual(['a', 'b', 'c'], self.eval('abc.toCharArray()')) def test_characters(self): - self.assertItemsEqual( + self.assertCountEqual( ['0', '1', '2', '3', '4', '5', '6', '7', '8', '9'], self.eval('characters(octdigits => true, digits => true)')) -- 2.31.1