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 <>
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/", line 358, in test_localtime_failure
    self.assertRaises(OSError, time.localtime, invalid_time_t)
AssertionError: OSError not raised by localtime

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