<div dir="ltr"><div>Hi there,</div><div>I like writing tests that use a lot of random values as input.</div><div><br></div><div>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.</div>
<div>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).</div><div><br></div><div>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.</div>
<div><br></div><div>Thanks!</div><div>Yoni.</div></div>