[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2016-05-23 Thread R. David Murray
R. David Murray added the comment: At the time I wanted it to be named assertCountsEqual, which is better (IMO) than either assertItemsEqual or assertCountEqual. I lost that naming contest, though :(. On the third hand, I don't think there exists a good two word name for what the function

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2016-05-20 Thread Vitaly
Vitaly added the comment: Folks, assertCountEqual sounds like a really bad name. It misleads users into thinking that it only compares the number of elements in each sequence, whereas it actually asserts that equivalent items are present in both sequences, regardless of order. The original

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2016-05-19 Thread Vitaly
Vitaly added the comment: I opened http://bugs.python.org/issue27060 regarding the erroneous documentation of assertItemsEqual in python 2.7. -- ___ Python tracker

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2016-05-19 Thread Vitaly
Vitaly added the comment: Python 2.7 documentation is VERY misleading about the functionality of assertItemsEqual. It actually claims to compare not only the counts, but the actual sorted elements themselves. This documentation mislead my group to use this method for comparing the elements.

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ronald Oussoren
New submission from Ronald Oussoren: assertItemsEqual was added to unittest.TestCase in Python 2.7 (according to the documentation), but is not present in Python 3.3. I'd expect it to be present in 3.3 as well, or for it to be mentioned in documentation as not being present (either in the 2.7

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ezio Melotti
Ezio Melotti added the comment: I don't remember how it went exactly, but there were a few similar methods (assertItemsEqual, assertSameElements, assertCountEqual). In 3.x we eventually decide to remove the first 2 because it wasn't clear what they were doing, and only assertCountEqual

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: I do think this should be mentioned in the 2.7 docs, assertDictContainsSubset is mentioned as deprecated since 3.2 in the 2.7 docs. The only problem with that is that there doesn't seem to be a versionremoved directive in sphinx, the best alternative seems

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Florent Xicluna
Changes by Florent Xicluna florent.xicl...@gmail.com: -- nosy: +flox ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17866 ___ ___ Python-bugs-list

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ezio Melotti
Ezio Melotti added the comment: I think they might actually be the same (i.e. the name changed but not the implementation). See #10242. If this is true the new name could be mentioned in 2.7. -- ___ Python tracker rep...@bugs.python.org

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: You're right, according to #10242 the method was renamed in 3.2. Something like the attached patch? I'm somewhat flabbergasted that #10242 came to the conclusion that it would be a good idea to rename this method, given the folks that contributed the

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ezio Melotti
Ezio Melotti added the comment: Apparently assertItemsEqual was added to 2.7 and 3.2 and, after the release of 2.7 but before the release of 3.2, assertItemsEqual has been renamed assertCountEqual (596239da3db7) and initially the assertItemsEqual was available too. However, since the method

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ezio Melotti
Ezio Melotti added the comment: Looks like we wrote a similar patch at the same time :) We don't usually use versionchanged in the 2.x docs for things that changed in 3.x. Using named instead of renamed is better, since in 3.x the name was assertCountEqual since the beginning, however saying

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: Your patch looks good. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17866 ___ ___ Python-bugs-list mailing

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset d9921cb6e3cd by Ezio Melotti in branch '2.7': #17866: mention that in Python 3, assertItemsEqual is named assertCountEqual. http://hg.python.org/cpython/rev/d9921cb6e3cd -- nosy: +python-dev ___ Python

[issue17866] TestCase.assertItemsEqual exists in 2.7, not in 3.3

2013-04-29 Thread Ezio Melotti
Ezio Melotti added the comment: Applied. -- assignee: docs@python - ezio.melotti components: -Library (Lib) resolution: - fixed stage: - committed/rejected status: open - closed versions: +Python 2.7 -Python 3.3, Python 3.4 ___ Python tracker