[Python-Dev] Unittests

Andrew P. Lentvorski bsder@allcaps.org
Tue, 9 Apr 2002 15:49:10 -0700 (PDT)

On Tue, 9 Apr 2002, Aahz wrote:

> On Tue, Apr 09, 2002, Neal Norwitz wrote:
> >
> > whrandom.py
> This is a deprecated module, no?

What is the "Official Python(tm)" method for generating a "guaranteed for
all time to always be the same if started with the same seed" string of
random numbers for use in something like a UnitTest?

The Random module does not seem to make any promises about repeatability
between versions, releases, operating-systems, etc.  The only thing which
enforces the repeatability is the fact that the generator is actually the
whrandom generator under the covers.

Incidentally, a similar question has been asked before and didn't really
get good closure on the response, see:


(I hope that URL comes through okay, if not search for "danil" and
"whrandom" in your favorite clp search engine)