Commit Graph

72 Commits

Author SHA1 Message Date
Florent Xicluna dfee6c8dee Actually, there's more than one failing value. (changeset 9cb1b85237a9, issue #13312). 2011-11-02 03:22:15 +01:00
Florent Xicluna e2a732e706 Issue #13312: skip the single failing value for now. 2011-11-02 01:28:17 +01:00
Florent Xicluna d1bd7f7730 Additional tests for negative years. 2011-11-01 23:42:05 +01:00
Florent Xicluna 725af4dc1d Lowercase the test name, to run last. 2011-11-01 17:42:24 +01:00
Florent Xicluna 050c7e64cd Replace temporary tests with the real test case for issue #13309 on Gentoo. 2011-11-01 16:58:54 +01:00
Florent Xicluna 712b14fc2a Troubleshoot issue #13309 on Gentoo buildbot. 2011-11-01 16:07:23 +01:00
Florent Xicluna 752c1d4c02 Add temporary tests to troubleshoot issue #13309 on Gentoo buildbot. 2011-11-01 15:12:34 +01:00
Florent Xicluna bceb528af5 Test the year range supported by time.strftime() and time.asctime(). 2011-11-01 14:11:34 +01:00
Florent Xicluna 49ce06858b Strengthen the tests for format '%Y', in relation with issue #13305. 2011-11-01 12:56:14 +01:00
Victor Stinner e0be423297 Close #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants to
the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a monotonic
clock
2011-10-25 13:06:09 +02:00
Victor Stinner 7f53a5027d Issue #12459: time.sleep() now raises a ValueError if the sleep length is
negative, instead of an infinite sleep on Windows or raising an IOError on
Linux for example, to have the same behaviour on all platforms.
2011-07-05 22:00:25 +02:00
Alexander Belopolsky 03163ac185 Issue #11930: Remove deprecated time.accept2dyear. 2011-05-02 12:20:52 -04:00
Senthil Kumaran ae664fb528 Merge from 3.1 2011-04-06 14:11:09 +08:00
Senthil Kumaran 8f377a3bbe Issue #10762: Guard against invalid/non-supported format string '%f' on Windows. Patch Santoso Wijaya. 2011-04-06 12:54:06 +08:00
Victor Stinner 13ed2ea7a2 Issue #10864 has been fixed: remove the workaround 2011-03-21 02:11:01 +01:00
Alexander Belopolsky 622ce124b6 Merged revisions 87921 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87921 | alexander.belopolsky | 2011-01-10 21:22:16 -0500 (Mon, 10 Jan 2011) | 1 line

  This should fix mktime test on Windows
........
2011-02-15 15:58:04 +00:00
Alexander Belopolsky 4fb96f41f4 Merged revisions 87919 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87919 | alexander.belopolsky | 2011-01-10 20:21:25 -0500 (Mon, 10 Jan 2011) | 4 lines

  Issue #1726687: time.mktime() will now correctly compute value one
  second before epoch.  Original patch by Peter Wang, reported by Martin
  Blais.
........
2011-02-15 15:40:59 +00:00
Alexander Belopolsky a6892418ad This should fix mktime test on Windows 2011-01-11 02:22:16 +00:00
Alexander Belopolsky 31c5dd6b19 Make mktime test more robust. 2011-01-11 01:35:22 +00:00
Alexander Belopolsky b7d40d1702 Issue #1726687: time.mktime() will now correctly compute value one
second before epoch.  Original patch by Peter Wang, reported by Martin
Blais.
2011-01-11 01:21:25 +00:00
Victor Stinner 301f1217ac Issue #1777412: Remove all limits on tm_year from time.strftime()
The buildbots will tell us which platform does support or not negative years.
2011-01-08 03:06:52 +00:00
Victor Stinner af5aee57c9 Issue #1777412: fix test_time for Mac OS X and OpenIndiana 2011-01-08 02:46:33 +00:00
Victor Stinner 736913269e Issue #1777412: test large years value for strftime('%Y') 2011-01-08 02:00:24 +00:00
Victor Stinner 73ea29cb03 Issue #1777412: strftime() accepts year >= 1 instead of year >= 1900
* With Visual Studio, year have to be in [1; 9999]
 * Add more tests on the year field
2011-01-08 01:56:31 +00:00
Alexander Belopolsky 0dd06f4082 Fixed error handling branches. Thanks
Victor Stinner for pointing this out.
2011-01-08 01:23:02 +00:00
Alexander Belopolsky c64708ae48 Issue #10827: Changed the rules for 2-digit years. The time.asctime
function will now format any year when time.accept2dyear is false and
will accept years >= 1000 otherwise.  The year range accepted by
time.mktime and time.strftime is still system dependent, but
time.mktime will now accept full range supported by the OS. Conversion
of 2-digit years to 4-digit is deprecated.
2011-01-07 19:59:19 +00:00
Alexander Belopolsky 610e544bf7 Further simplify gettmarg() 2011-01-06 21:57:06 +00:00
Alexander Belopolsky a686725859 - time.accept2dyear = True is now equivalent to time.accept2dyear = 1
- removed unnecessary struct_time to tuple conversion
- added more unit tests
(See issue #10827 for discussion.)
2011-01-05 23:00:47 +00:00
Victor Stinner b996f740f2 test_time: assertEquals => assertEqual 2011-01-05 03:58:54 +00:00
Antoine Pitrou 1ec121d0d1 Fix test_time under Windows 2011-01-04 22:54:30 +00:00
Georg Brandl 3fb97ae0f7 Fix exception catching. 2011-01-04 17:27:13 +00:00
Alexander Belopolsky ecebdc7469 Issue #8013: Fix time.ctime test failure on 32-bit platforms. 2011-01-04 17:08:04 +00:00
Alexander Belopolsky b9588b528a Issue #8013: time.asctime and time.ctime no longer call system asctime
and ctime functions.  The year range for time.asctime is now 1900
through maxint.  The range for time.ctime is the same as for
time.localtime.  The string produced by these functions is longer than
24 characters when year is greater than 9999.
2011-01-04 16:34:30 +00:00
Alexander Belopolsky 622eb174d2 Issue 10814: time.asctime test will now use a valid day with out of range year. 2011-01-03 17:06:39 +00:00
Alexander Belopolsky d4bf48bbb3 Merged revisions 87648,87656 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87648 | alexander.belopolsky | 2011-01-02 15:48:22 -0500 (Sun, 02 Jan 2011) | 1 line

  Issue #8013: Fixed time.asctime segfault when OS's asctime fails
........
  r87656 | alexander.belopolsky | 2011-01-02 17:16:10 -0500 (Sun, 02 Jan 2011) | 1 line

  Issue #8013: Fixed test
........
2011-01-02 23:09:41 +00:00
Georg Brandl e10608cf5d #8013 follow-up:
* In asctime and ctime, properly remove the newline if the year has more than four digits
* Consistent error message for both functions
* Fix the test comments and add a check for the removed newline
2011-01-02 22:33:43 +00:00
Alexander Belopolsky 3e913c9ecf Issue #8013: Fixed test 2011-01-02 22:16:10 +00:00
Alexander Belopolsky e2dc082294 Issue #8013: Fixed time.asctime segfault when OS's asctime fails 2011-01-02 20:48:22 +00:00
R. David Murray f3d082c960 Merged revisions 87222 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r87222 | r.david.murray | 2010-12-13 20:22:50 -0500 (Mon, 13 Dec 2010) | 2 lines

  Use skipIf instead of a return when attribute doesn't exist.
........
2010-12-14 01:25:30 +00:00
R. David Murray 6ecf76ea36 Use skipIf instead of a return when attribute doesn't exist. 2010-12-14 01:22:50 +00:00
Ezio Melotti 19f2aeba67 Merged revisions 86596 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k

........
  r86596 | ezio.melotti | 2010-11-20 21:04:17 +0200 (Sat, 20 Nov 2010) | 1 line

  #9424: Replace deprecated assert* methods in the Python test suite.
........
2010-11-21 01:30:29 +00:00
Ezio Melotti b3aedd4862 #9424: Replace deprecated assert* methods in the Python test suite. 2010-11-20 19:04:17 +00:00
Alexander Belopolsky 38e2996152 Issue #6608: time.asctime is now checking struct tm fields its input
before passing it to the system asctime.  Patch by MunSic Jeong.
2010-10-01 14:18:49 +00:00
Brett Cannon 7d12c559ce Merged revisions 75011 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r75011 | brett.cannon | 2009-09-21 17:29:48 -0700 (Mon, 21 Sep 2009) | 10 lines

  When range checking was added to time.strftime() a check was placed on tm_isdst
  to make sure it fell within [-1, 1] just in case someone implementing
  strftime() in libc was stupid enough to assume this. Turns out, though, some
  OSs (e.g. zOS) are stupid enough to use values outside of this range for time
  structs created by the system itself. So instead of throwing a ValueError,
  tm_isdst is now normalized before being passed to strftime().

  Fixes issue #6823. Thanks Robert Shapiro for diagnosing the problem and
  contributing an initial patch.
........
2009-09-22 00:32:59 +00:00
Georg Brandl ab91fdef1f Merged revisions 73715 via svnmerge from
svn+ssh://svn.python.org/python/branches/py3k

........
  r73715 | benjamin.peterson | 2009-07-01 01:06:06 +0200 (Mi, 01 Jul 2009) | 1 line

  convert old fail* assertions to assert*
........
2009-08-13 08:51:18 +00:00
Benjamin Peterson c9c0f201fe convert old fail* assertions to assert* 2009-06-30 23:06:06 +00:00
Martin v. Löwis a6a9c4d2ac 5562 -> 3061. 2009-05-30 06:15:30 +00:00
Martin v. Löwis 1b01ccd76a Issue #5562: Use wcsftime for time.strftime where available. 2009-05-30 06:13:40 +00:00
Brett Cannon 7f6b4f86e3 Make sure time.strptime only accepts strings (and document the fact like
strftime). Already didn't accept bytes but make the check earlier. This also
lifts the limitation of requiring ASCII.

Closes issue #5236. Thanks Tennessee Leeuwenburg.
2009-03-30 21:30:26 +00:00
Benjamin Peterson ee8712cda4 #2621 rename test.test_support to test.support 2008-05-20 21:35:26 +00:00