diff options
author | Ned Batchelder <ned@nedbatchelder.com> | 2018-10-19 07:01:37 -0400 |
---|---|---|
committer | Ned Batchelder <ned@nedbatchelder.com> | 2018-10-19 07:05:46 -0400 |
commit | a28cd71722750230a6c13794fa47dd54ccb6f224 (patch) | |
tree | 31bdf30b4aa48f7792a9468254cee542488a20c5 /coverage | |
parent | e08528bb01063c7b6db60b9c7c2516615b818303 (diff) | |
download | python-coveragepy-git-a28cd71722750230a6c13794fa47dd54ccb6f224.tar.gz |
PyPy3 fixed an obscure bug long ago, we don't need this override
Diffstat (limited to 'coverage')
-rw-r--r-- | coverage/backunittest.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/coverage/backunittest.py b/coverage/backunittest.py index 21d7bcb2..242e9d39 100644 --- a/coverage/backunittest.py +++ b/coverage/backunittest.py @@ -20,13 +20,9 @@ class TestCase(unittest.TestCase): """ # pylint: disable=missing-docstring - # Many Pythons have this method defined. But PyPy3 has a bug with it - # somehow (https://bitbucket.org/pypy/pypy/issues/2092), so always use our - # own implementation that works everywhere, at least for the ways we're - # calling it. - def assertCountEqual(self, s1, s2): - """Assert these have the same elements, regardless of order.""" - self.assertEqual(sorted(s1), sorted(s2)) + if not unittest_has('assertCountEqual'): + def assertCountEqual(self, *args, **kwargs): + return self.assertItemsEqual(*args, **kwargs) if not unittest_has('assertRaisesRegex'): def assertRaisesRegex(self, *args, **kwargs): |