STINNER Victor added the comment: Hum, conversion from Python float to _PyTime_t is not rounded as expected on x86 Ubuntu Shared 3.x. Example:
http://buildbot.python.org/all/builders/x86%20Ubuntu%20Shared%203.x/builds/11426/steps/test/logs/stdio ====================================================================== FAIL: test_FromSecondsObject (test.test_time.TestPyTime_t) (obj=1e-06, round=<_PyTime.ROUND_FLOOR: 0>, timestamp=1000) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_time.py", line 779, in test_FromSecondsObject self.assertEqual(PyTime_FromSecondsObject(obj, rnd), ts) AssertionError: 999 != 1000 ====================================================================== FAIL: test_FromSecondsObject (test.test_time.TestPyTime_t) (obj=4194304.000000001, round=<_PyTime.ROUND_FLOOR: 0>, timestamp=4194304000000001) ---------------------------------------------------------------------- Traceback (most recent call last): File "/srv/buildbot/buildarea/3.x.bolen-ubuntu/build/Lib/test/test_time.py", line 779, in test_FromSecondsObject self.assertEqual(PyTime_FromSecondsObject(obj, rnd), ts) AssertionError: 4194304000000000 != 4194304000000001 ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22117> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com