STINNER Victor <victor.stin...@haypocalc.com> added the comment: 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. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue13847> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com