diff options
author | melissaml <ma.lei@99cloud.net> | 2020-07-05 20:04:04 +0800 |
---|---|---|
committer | melissaml <ma.lei@99cloud.net> | 2020-07-05 20:04:04 +0800 |
commit | cf327a2e2d4e2c504b5080fbf7bd48421fe7b4c7 (patch) | |
tree | 9f3ebf499597264adbaa2a0411c600509346787d /taskflow/test.py | |
parent | 2a9761bece22b58df6c7616f9bdcf0589f6af77f (diff) | |
download | taskflow-cf327a2e2d4e2c504b5080fbf7bd48421fe7b4c7.tar.gz |
Switch from unittest2 compat methods to Python 3.x methods
With the removal of Python 2.x we can remove the unittest2 compat
wrappers and switch to assertCountEqual instead of assertItemsEqual
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: Iaa8251a1e9965a00fe99b7a740a104c011260340
Diffstat (limited to 'taskflow/test.py')
-rw-r--r-- | taskflow/test.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/taskflow/test.py b/taskflow/test.py index 2b1678d..a9cce35 100644 --- a/taskflow/test.py +++ b/taskflow/test.py @@ -182,7 +182,7 @@ class TestCase(base.BaseTestCase): except exceptions.WrappedFailure as e: self.assertThat(e, FailureRegexpMatcher(exc_class, pattern)) - def assertItemsEqual(self, seq1, seq2, msg=None): + def assertCountEqual(self, seq1, seq2, msg=None): matcher = ItemsEqual(seq1) self.assertThat(seq2, matcher) |