[Python-bugs-list] [ python-Bugs-690083 ] test_random fails sometimes

SourceForge.net noreply@sourceforge.net
Thu, 20 Feb 2003 08:08:31 -0800


Bugs item #690083, was opened at 2003-02-20 10:07
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=690083&group_id=5470

Category: Python Library
Group: Python 2.3
Status: Open
Resolution: None
Priority: 5
Submitted By: M.-A. Lemburg (lemburg)
>Assigned to: Raymond Hettinger (rhettinger)
Summary: test_random fails sometimes

Initial Comment:
>> test test_random failed -- Traceback (most recent
call last):
>>   File
"/home/lemburg/projects/Python/Dev-Python/Lib/test/test_random.py",
line 25, in test_autoseed
>>     self.assertNotEqual(state1, state2)
>>   File
"/home/lemburg/projects/Python/Dev-Python/Lib/unittest.py",
line 300, in failIfEqual
>>     raise self.failureException, \
>> AssertionError: (2, (1045703145, 318847470,
620640488, 320379787, -1732263717, -1278593374, ...
>
>
>
> This one I don't understand.  Maybe the sleep(1) in
the test isn't
> long enough?


I could not reproduce this, but perhaps using
long(time.time()*256) isn't
safe enough to produce different states in the
WH-generator ?! I'd
add a counter or hash the previous stored state to add some
more noise.


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=690083&group_id=5470