On Sat, May 30, 2015 at 12:16:01PM +0100, Sydney Shall wrote:

> I have written a unittest class which works OK.
> But the problem I have is that because I use the random module to 
> populate my initial arrays, my data is not strictly predictable even 
> though I am using seed(0).

Please show us how you populate your arrays, because what you describe 
sounds wrong. Seeding to the same value should give the same sequence of 
values:

py> import random
py> random.seed(0)
py> a = [random.random() for i in range(10**6)]
py> random.seed(0)
py> b = [random.random() for i in range(10**6)]
py> a == b
True


-- 
Steve
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor

Reply via email to