[TIP] Using randomic tests

Aviv Ben-Yosef aviv.by at gmail.com
Tue Nov 16 00:59:14 PST 2010


Hey Yoni,

I don't know any main-stream plugin that does what you ask for, but I'd
advise you to follow this issue in nose's site:
http://code.google.com/p/python-nose/issues/detail?id=255

It contains a patch that does what you want and more, and might be a bit
alive (last post a few weeks ago).

Cheers,


On Mon, Nov 15, 2010 at 18:20, Yoni Tsafir <yonix85 at gmail.com> wrote:

> Hi there,
> I like writing tests that use a lot of random values as input.
>
> Something I found useful during my experience in other languages, is to
> have some kind of test runner that prints the initial random seed when a
> test fails, and lets you run your tests with the same random seed again so
> you can debug it and tell why the test failed with this particular seed.
> This of course forces your tests to use a the singleton instance of random
> instead of instantiating new classes of "random.Random" (or maybe use
> another singleton random object).
>
> Now, before I start writing this mechanism in python as well, I was
> wondering if there is anything already implemented in this area (maybe some
> kind of nose's hidden feature or something), or any other suggestions of
> ways to achieve what I'm seeking after.
>
> Thanks!
> Yoni.
>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>
>


-- 
Aviv Ben-Yosef
Miracle Max: You rush a miracle man, you get rotten miracles.
@avivby <http://twitter.com/avivby> http://codelord.net
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20101116/fb01810f/attachment.htm>


More information about the testing-in-python mailing list