changeset: 89319:00e94e454813 user: Victor Stinner date: Fri Feb 21 23:54:32 2014 +0100 files: Lib/test/test_time.py description: Issue #11188, #19748: mktime() returns -1 on error. On Linux, the tm_wday field is used as a sentinel () to detect if -1 is really an error or a valid timestamp. On AIX, tm_wday is unchanged even on success and so cannot be used as a sentinel. diff -r 5057eaff9d68 -r 00e94e454813 Lib/test/test_time.py --- a/Lib/test/test_time.py Fri Feb 21 22:29:58 2014 +0000 +++ b/Lib/test/test_time.py Fri Feb 21 23:54:32 2014 +0100 @@ -346,6 +346,13 @@ def test_mktime(self): # Issue #1726687 for t in (-2, -1, 0, 1): + if sys.platform.startswith('aix') and t == -1: + # Issue #11188, #19748: mktime() returns -1 on error. On Linux, + # the tm_wday field is used as a sentinel () to detect if -1 is + # really an error or a valid timestamp. On AIX, tm_wday is + # unchanged even on success and so cannot be used as a + # sentinel. + continue try: tt = time.localtime(t) except (OverflowError, OSError):