On Wed, 2009-12-02 at 23:36 +0100, holger krekel wrote: > Hi all, > > Am considering combinations of test test generators currently. > Currently if a test like this: > > def test_function(arg1, arg2): > ... > > has two test generators, one adding calls > with multiple values for 'arg1', another > for 'arg2' then the code for doing the > combinations must be contained in a single > test generator, written manually. > > Now, before i start to think about a backward-compatible > way to make this more convenient and allow test generators > to orthogonally combine i'd like to know if anybody > else felt a similar need.
I feelt that need. In anyvc i have a set of tests where i need/want to run a set of remote backends on a set of python versions. However currently i'm under the impression that the new proposed dist-model might already do (im not sure on that yet). Still i'd like to propose some of my toughts on a hopefuly backward-compatible extension to the current test-generator model. I think the basic need is to chain and/or nest these generators. i.e. find all declarations that apply, figure an order, then proceed to call the 'inner' hook for each addcall invocation in an 'outer' hook 'inner' hooks are simply ordered after 'outer' hooks in the list of fitting hooks now, that would work well for hooks from plugins, or packages/modules, however it doesnt yet work well for defining 2 different hooks at the same level. one could use something like a tuple, or a dedicated object in order to manage n hooks at a time. other options would include smart decorators or prefixes. As more than one hook at a level is generally tricky to get right&nice its something that requires a good deal of discussion if combinatoric versions of the generate_test hooks are considered for implementation. Regards Ronny _______________________________________________ py-dev mailing list py-dev@codespeak.net http://codespeak.net/mailman/listinfo/py-dev