This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gregory.p.smith
Recipients MarkRoddy, ezio.melotti, georg.brandl, gregory.p.smith, michael.foord, rhettinger
Date 2010-12-10.01:40:35
SpamBayes Score 6.393763e-11
Marked as misclassified No
Message-id <1291945237.75.0.766392980101.issue10242@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2010-12-10 01:40:37gregory.p.smithsetrecipients: + gregory.p.smith, georg.brandl, rhettinger, ezio.melotti, michael.foord, MarkRoddy
2010-12-10 01:40:37gregory.p.smithsetmessageid: <1291945237.75.0.766392980101.issue10242@psf.upfronthosting.co.za>
2010-12-10 01:40:35gregory.p.smithlinkissue10242 messages
2010-12-10 01:40:35gregory.p.smithcreate