Mark Diekhans <ma...@kermodei.com> added the comment:

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 <rep...@bugs.python.org> writes:
> 
> R. David Murray <rdmur...@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 <rep...@bugs.python.org>
> <http://bugs.python.org/issue12600>
> _______________________________________

----------

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

Reply via email to