Author vstinner
Recipients belopolsky, python-dev, vstinner
Date 2012-01-26.23:44:16
SpamBayes Score 1.03677e-11
Marked as misclassified No
Message-id <1327621457.05.0.242576778502.issue13847@psf.upfronthosting.co.za>
In-reply-to
Content
I added tests on localtime() and clock().

I read more carefully time(), ftime() and gettimeofday() manpage: it is not possible that they fail if the argument is an invalid pointer, the current code is correct.

I don't want to backport changes because they are incompatible.

--

There is a failure on FreeBSD 8.2:


======================================================================
FAIL: test_localtime_failure (test.test_time.TimeTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/usr/home/buildbot/buildarea/3.x.krah-freebsd/build/Lib/test/test_time.py", line 358, in test_localtime_failure
    self.assertRaises(OSError, time.localtime, invalid_time_t)
AssertionError: OSError not raised by localtime

http://www.python.org/dev/buildbot/all/builders/AMD64%20FreeBSD%208.2%203.x/builds/1746/steps/test/logs/stdio

test_localtime_failure() should be removed or at least skipped on FreeBSD, except if someone knows another invalid time_t value on this platform.
History
Date User Action Args
2012-01-26 23:44:17vstinnersetrecipients: + vstinner, belopolsky, python-dev
2012-01-26 23:44:17vstinnersetmessageid: <1327621457.05.0.242576778502.issue13847@psf.upfronthosting.co.za>
2012-01-26 23:44:16vstinnerlinkissue13847 messages
2012-01-26 23:44:16vstinnercreate