Author ncoghlan
Recipients Yaroslav.Halchenko, abingham, brian.curtin, eric.araujo, eric.snow, exarkun, ezio.melotti, fperez, michael.foord, nchauvat, ncoghlan, pitrou, r.david.murray
Date 2011-07-21.23:44:33
SpamBayes Score 2.40873e-09
Marked as misclassified No
Message-id <1311291874.41.0.41396674389.issue7897@psf.upfronthosting.co.za>
In-reply-to
Content
In my example, I needed a word to cover each entry in the collection of parameter tuples. 'case' fit the bill.

The reason I like the builder approach is that it means the simplest usage is to just create a list (or other iterable) of parameter tuples to be tested, then pass that list to the decorator factory. The sequential naming will then let you find the failing test cases in the sequence.

Custom builders then cover any cases where better naming is possible and desirable (such as explicitly naming each case as part of the parameters).

One refinement that may be useful is for the builders to produce (name, description, parameters) 3-tuple rather than 2-tuples, though. Then the default builder could just insert repr(params) as the description, while David's custom builder could either leave the description blank, or include a relevant subset of the parameters.
History
Date User Action Args
2011-07-21 23:44:34ncoghlansetrecipients: + ncoghlan, exarkun, pitrou, ezio.melotti, eric.araujo, r.david.murray, michael.foord, brian.curtin, fperez, Yaroslav.Halchenko, nchauvat, abingham, eric.snow
2011-07-21 23:44:34ncoghlansetmessageid: <1311291874.41.0.41396674389.issue7897@psf.upfronthosting.co.za>
2011-07-21 23:44:33ncoghlanlinkissue7897 messages
2011-07-21 23:44:33ncoghlancreate