This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients belopolsky, loewis, pitrou, python-dev, serhiy.storchaka, tim.peters, vstinner
Date 2015-03-30.08:21:45
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1427703706.15.0.4795634728.issue22117@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2015-03-30 08:21:46vstinnersetrecipients: + vstinner, tim.peters, loewis, belopolsky, pitrou, python-dev, serhiy.storchaka
2015-03-30 08:21:46vstinnersetmessageid: <1427703706.15.0.4795634728.issue22117@psf.upfronthosting.co.za>
2015-03-30 08:21:46vstinnerlinkissue22117 messages
2015-03-30 08:21:45vstinnercreate