Gregory P. Smith <g...@krypto.org> added the comment:

I have to agree that the name assertCountEqual does not work well for me as 
something I can read and really comprehend what it is going to do without 
searching for the docs or implementation to double check.  (not that 
assertItemsEqual did either).  'Count' does not strongly imply to me that it is 
expecting sequences or really tell me what it will be testing.

Brainstorming based on other suggestions i've seen and some i've made up:

  assertCountEqual             [in 3.2beta1]
  assertCountsEqual
  assertElementCountEqual      [michael.foord]
  assertElementCountsEqual
  assertItemCountEqual
  assertItemCountsEqual
  assertItemsEqual             [old, agreed to replace this]

When it comes down to Item vs Element I do like the sound of Element even 
though it is longer to type.

Should it be singular 'Count' (Dracula?) or plural/possessive 'Counts'?

To me "assertCountEqual" makes me think of the other assertFooEqual methods and 
wonder what data structure type a "Count" is.  You could argue that calling it 
assertCounterEqual would make sense in reference to collections.Counter but I 
do not think that actually ready any more explanatory when reading.

I'm sorry that this is a bikeshed.  But if we're gonna change the paint color, 
during the beta is a good time.

my problem with assertElementCountEqual is that being singular I could read a 
statement such as "self.assertElementCountEqual(listA, setB)" and assume that 
it is the same as "self.assertEqual(len(listA), len(setB))"

assertElementCountsEqual by virtue of the mere 's' implies to me that it is not 
doing a len(listA) but is instead counting up the individual elementS and 
comparing those counts.   So after all this rambling, I think that's my vote.

Agree/disagree/indifferent?

----------
nosy: +gregory.p.smith

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue10242>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to