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
This commit is contained in:
parent
c3bda9eeb1
commit
b4c39c5874
|
@ -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)'))
|
||||
|
||||
|
|
Loading…
Reference in New Issue