Message123712
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? |
|
Date |
User |
Action |
Args |
2010-12-10 01:40:37 | gregory.p.smith | set | recipients:
+ gregory.p.smith, georg.brandl, rhettinger, ezio.melotti, michael.foord, MarkRoddy |
2010-12-10 01:40:37 | gregory.p.smith | set | messageid: <1291945237.75.0.766392980101.issue10242@psf.upfronthosting.co.za> |
2010-12-10 01:40:35 | gregory.p.smith | link | issue10242 messages |
2010-12-10 01:40:35 | gregory.p.smith | create | |
|