On 11 Jan, 13:34, Steven D'Aprano <steve +comp.lang.pyt...@pearwood.info> wrote: > Well, that's not really a task for unit testing. Unit tests, like most > tests, are well suited to deterministic tests, but not really to > probabilistic testing. As far as I know, there aren't really any good > frameworks for probabilistic testing, so you're stuck with inventing your > own. (Possibly on top of unittest.)
One approach I've had success with is providing a seed to the RNG, so that the random results are deterministic. -- http://mail.python.org/mailman/listinfo/python-list