[TIP] hackish generative tests (was: Re: Generating tests, II (was: Re: Meta-test methods...))
holger krekel
holger at merlinux.eu
Wed May 6 02:18:11 PDT 2009
On Tue, May 05, 2009 at 20:48 -0400, Douglas Philips wrote:
> Earlier, I indited:
> > I really like the funcargs approach, and it might work in my
> > setting. It would require a gradual transition from
> > self.power_cycle(..) to power_device.power_cycle() where
> > power_device was a funcargs provided parameter. :)
>
> In the example you showed, a func-args-producer was passed in a func-
> args-consumer function.
> I was presuming that this would generalize to multiple arguments, but
> wanted to make that an explicit point. One test might need a power
> interface and a communications interface and ... (typically about
> three or four such wirings up for the more complex tests)...
yes, if you look again at the issue-code, you'll notice
that its has access to all funcargs at once and
could also set multiple funcargs at once.
The "normal" pytest_funcarg__NAME methods only produce
a single funcarg instance. Allows for orthogonality between
funcarg producers.
holger
>
> -Doug
>
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
--
Metaprogramming, Python, Testing: http://tetamap.wordpress.com
Python, PyPy, pytest contracting: http://merlinux.eu
More information about the testing-in-python
mailing list