Message 151432 - Python tracker

Message151432

Author diekhans
Recipients Yaroslav.Halchenko, abingham, brian.curtin, diekhans, eric.araujo, eric.snow, exarkun, ezio.melotti, fperez, michael.foord, nchauvat, ncoghlan, pere.martir, pitrou, r.david.murray, terry.reedy
Date 2012-01-17.09:00:49
SpamBayes Score 7.0849704e-09
Marked as misclassified No
Message-id <20245.14525.902239.978965@osprey.kermodei.com>
In-reply-to <1326737812.66.0.739021077379.issue12600@psf.upfronthosting.co.za>
Content
Allowing loadTestsFromTestCase() to take either a testCaseClass
or a (testCaseClass, param) tuple, where the param is then past
to the __init__ function might do the trick.  One param is sufficient, since it can
be a container for any number of params. This allows more fields
to be added to the tuple for some future, unforeseen need.

An container object for class and parameters would be a bit more
structured than a tuple.

A factory function would be the most flexible, however it seems
to go against the class introspection for discovering tests.
Then again, I don't know the code very well.

R. David Murray <report@bugs.python.org> writes:
> 
> R. David Murray <rdmurray@bitdance.com> added the comment:
> 
> Maybe we could add a recipe for doing this to the load_tests docs?
> 
> I don't think that load_tests is going to be more readable, though, since it doesn't allow you to put the parameterization next to the class you are parameterizing (unless you do some additional hackery).
> 
> But yes, if anything else is done a concrete API proposal is the first requirement.
> 
> ----------
> 
> _______________________________________
> Python tracker <report@bugs.python.org>
> <http://bugs.python.org/issue12600>
> _______________________________________
History
Date User Action Args
2012-01-17 09:00:51diekhanssetrecipients: + diekhans, terry.reedy, exarkun, ncoghlan, pitrou, ezio.melotti, eric.araujo, r.david.murray, michael.foord, brian.curtin, fperez, Yaroslav.Halchenko, nchauvat, abingham, eric.snow, pere.martir
2012-01-17 09:00:50diekhanslinkissue12600 messages
2012-01-17 09:00:49diekhanscreate