[Twisted-Python] Trial - A replacement for pyunit.
exarkun at intarweb.us
Mon Jan 6 03:01:29 EST 2003
On Mon, Jan 06, 2003 at 05:34:17PM +1100, Andrew Bennetts wrote:
> On Mon, Jan 06, 2003 at 06:06:08AM +0200, Tommi Virtanen wrote:
> > On Sun, Jan 05, 2003 at 03:45:39AM -0500, Christopher Armstrong wrote:
> > > > TODO (maybe):
> > > ...
> > > > - Randomize execution order
> > >
> > > Thought of something.
> > >
> > > When this is implemented, it'll be very important (for obvious
> > > reasons) to have the execution order saved to some file on every run,
> > > with the ability to read in that file for future runs.
> > Maybe just print out the PRNG seed you started with when exiting.
> Hmm. While Python's PRNG is pure python, so should give the same results
> with the same seed on different platforms, I think saving the execution
> order is better. Consider the case of fixing a test that involves
> generating more or less random numbers than before -- the act of fixing the
> test loses the determinism you were hoping to preserve with the PRNG.
You could create a new Random object that is used exclusively by the test
framework. Calls to its generation functions won't be interferred with by
calls to the "regular" functions, nor will it interfere with them. I think
just saving the seed is a little cleaner and, imho, the unit tests already
leave far too much garbage lying around on the filesystem as it is ;)
Where a calculator on the ENIAC is equipped with 18,000 vacuum tubes and
weighs 30 tons, computers in the future may have only 1,000 vacuum tubes and
weigh only 1.5 tons. -- Popular Mechanics, March 1949
12:00am up 21 days, 9:46, 1 user, load average: 0.04, 0.11, 0.16
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: not available
Url : http://twistedmatrix.com/pipermail/twisted-python/attachments/20030106/fc8b6023/attachment.pgp
More information about the Twisted-Python