[New-bugs-announce] [issue5073] bsddb/test/test_lock.py sometimes fails due to floating point error

Hirokazu Yamamoto report at bugs.python.org
Mon Jan 26 21:20:17 CET 2009


New submission from Hirokazu Yamamoto <ocean-city at m2.ccsnet.ne.jp>:

time.time() returns floating point, so sometimes folloing assertion in 
LockingTestCase#test03_lock_timeout fails due to floating point 
calculation error.

>self.assertTrue((end_time-start_time) >= 0.1

end_time-start_time becomes 0.0999999046326 for instance. I ran 
test_lock.py 100 times after applied the attached patch, I saw no error.

----------
components: Tests
files: test_lock.patch
keywords: patch
messages: 80589
nosy: ocean-city
severity: normal
status: open
title: bsddb/test/test_lock.py sometimes fails due to floating point error
versions: Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file12869/test_lock.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue5073>
_______________________________________


More information about the New-bugs-announce mailing list