summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_time.py
Commit message (Collapse)AuthorAgeFilesLines
* Issue #1667546: On platforms supporting tm_zone and tm_gmtoff fieldsAlexander Belopolsky2012-06-141-1/+52
| | | | | | in struct tm, time.struct_time objects returned by time.gmtime(), time.localtime() and time.strptime() functions now have tm_zone and tm_gmtoff attributes. Original patch by Paul Boddie.
* Fix test_time for adjusted/adjustable changesVictor Stinner2012-06-121-6/+2
|
* PEP 418: Rename adjusted attribute to adjustable in time.get_clock_info() resultVictor Stinner2012-06-121-6/+6
| | | | | | | | Fix also its value on Windows and Linux according to its documentation: "adjustable" indicates if the clock *can be* adjusted, not if it is or was adjusted. In most cases, it is not possible to indicate if a clock is or was adjusted.
* Fix sporadic failure of test_time.test_process_time() on WindowsVictor Stinner2012-06-011-2/+5
| | | | Use a threshold of 20 ms instead of 10 ms.
* don't use assertEqual for test for bool equalityBenjamin Peterson2012-05-011-9/+9
|
* strip is_ prefixes on clock_info fieldsBenjamin Peterson2012-05-011-11/+11
|
* Issue #14428: Remove test_process_time_threads() from test_timeVictor Stinner2012-04-291-52/+0
| | | | | The test is unstable and it's not really interesting to test exactly how threads are handled.
* Issue #14428: Make test_process_time_threads() less strictVictor Stinner2012-04-291-1/+2
|
* Issue #14428: Rewrite test_process_time_threads() testVictor Stinner2012-04-291-7/+40
| | | | time.process_time() is CPU time, not a number of seconds.
* Issue #14428, #14397: Implement the PEP 418Victor Stinner2012-04-291-12/+95
| | | | | | | | | * Rename time.steady() to time.monotonic() * On Windows, time.monotonic() uses GetTickCount/GetTickCount64() instead of QueryPerformanceCounter() * time.monotonic() uses CLOCK_HIGHRES if available * Add time.get_clock_info(), time.perf_counter() and time.process_time() functions
* Expose clock_settime() as time.clock_settime()Victor Stinner2012-04-021-0/+11
|
* Issue #10278: Add an optional strict argument to time.steady(), False by defaultVictor Stinner2012-03-151-0/+10
|
* Issue #10278: Drop time.monotonic() function, rename time.wallclock() to ↵Victor Stinner2012-03-141-22/+3
| | | | | | | | | time.steady() * On Mac OS X, time.steady() now uses mach_absolute_time(), a monotonic clock * Optimistic change: bet that CLOCK_MONOTONIC and CLOCK_REALTIME are available when clock_gettime() is available * Rewrite time.steady() documentation
* Close #14180: Factorize code to convert a number of seconds to time_t, ↵Victor Stinner2012-03-131-8/+49
| | | | | | | | | | | | | timeval or timespec time.ctime(), gmtime(), time.localtime(), datetime.date.fromtimestamp(), datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now raises an OverflowError, instead of a ValueError, if the timestamp does not fit in time_t. datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp() now round microseconds towards zero instead of rounding to nearest with ties going away from zero.
* Issue #13964: signal.sigtimedwait() timeout is now a float instead of a tupleVictor Stinner2012-03-021-1/+20
| | | | Add a private API to convert an int or float to a C timespec structure.
* Backout f8409b3d6449: the PEP 410 is not accepted yetVictor Stinner2012-02-081-29/+4
|
* PEP 410Victor Stinner2012-02-081-4/+29
|
* Issue #13846: Add time.monotonic(), monotonic clock.Victor Stinner2012-02-071-1/+17
|
* Issue #13847: Fix test_time, time.gmtime() doesn't use localtime()Victor Stinner2012-01-291-1/+0
| | | | On Windows, localtime(-1) fails, but not gmtime(1).
* Issue #13847: Make test_localtime_failure() more robustVictor Stinner2012-01-271-10/+15
| | | | Skip the test if we are unable to find an invalid time_t value.
* Issue #13847: Fix test_mktime(), time.localtime() now raises OSErrorVictor Stinner2012-01-261-1/+1
|
* Issue #13847: time.localtime() and time.gmtime() now raise an OSError insteadVictor Stinner2012-01-261-0/+15
| | | | | of ValueError on failure. time.ctime() and time.asctime() now raises an OSError if localtime() failed.
* Issue #10278: wallclock() cannot go backward, but two consecutive callsVictor Stinner2012-01-231-1/+1
| | | | may return the same time.
* Issue #10278: Be more explicit in tests than wallclock() is monotonic (cannotVictor Stinner2012-01-201-4/+9
| | | | go backward)
* Be more lenient in test_wallclock (issue #10278).Antoine Pitrou2012-01-181-2/+2
|
* Close #10278: Add time.wallclock() function, monotonic clock.Victor Stinner2012-01-181-0/+7
|
* Issue #11886: Fix also test_time for the non-DST timezone name (EST/AEST)Victor Stinner2011-12-101-4/+6
|
* (Merge 3.2) Issue #11886: workaround an OS bug (time zone data) in test_timeVictor Stinner2011-12-071-1/+6
|\ | | | | | | | | | | | | Australian Eastern Standard Time (UTC+10) is called "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some operating systems (e.g. FreeBSD), which is wrong. See for example this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810
| * Issue #11886: workaround an OS bug (time zone data) in test_timeVictor Stinner2011-12-071-1/+6
| | | | | | | | | | | | | | Australian Eastern Standard Time (UTC+10) is called "EST" (as Eastern Standard Time, UTC-5) instead of "AEST" on some operating systems (e.g. FreeBSD), which is wrong. See for example this bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=93810
* | Use unittest.skipUnless to skip the test related to the glibc bug, issue #13309.Florent Xicluna2011-11-111-12/+13
| |
* | Avoid a glibc bug in test_time (issue #13309)Antoine Pitrou2011-11-111-3/+5
| |
* | Issue #13312: skip the failing negative years for now.Florent Xicluna2011-11-021-3/+4
| |
* | Actually, there's more than one failing value. (changeset 9cb1b85237a9, ↵Florent Xicluna2011-11-021-2/+3
| | | | | | | | issue #13312).
* | Issue #13312: skip the single failing value for now.Florent Xicluna2011-11-021-1/+3
| |
* | Additional tests for negative years.Florent Xicluna2011-11-011-0/+2
| |
* | Lowercase the test name, to run last.Florent Xicluna2011-11-011-4/+3
| |
* | Replace temporary tests with the real test case for issue #13309 on Gentoo.Florent Xicluna2011-11-011-7/+9
| |
* | Troubleshoot issue #13309 on Gentoo buildbot.Florent Xicluna2011-11-011-2/+4
| |
* | Add temporary tests to troubleshoot issue #13309 on Gentoo buildbot.Florent Xicluna2011-11-011-0/+4
| |
* | Test the year range supported by time.strftime() and time.asctime().Florent Xicluna2011-11-011-37/+59
| |
* | Strengthen the tests for format '%Y', in relation with issue #13305.Florent Xicluna2011-11-011-14/+52
| |
* | Close #10278: Add clock_getres(), clock_gettime() and CLOCK_xxx constants toVictor Stinner2011-10-251-0/+21
| | | | | | | | | | the time module. time.clock_gettime(time.CLOCK_MONOTONIC) provides a monotonic clock
* | Issue #12459: time.sleep() now raises a ValueError if the sleep length isVictor Stinner2011-07-051-0/+2
| | | | | | | | | | negative, instead of an infinite sleep on Windows or raising an IOError on Linux for example, to have the same behaviour on all platforms.
* | Issue #11930: Remove deprecated time.accept2dyear.Alexander Belopolsky2011-05-021-57/+6
|/
* Merge from 3.1Senthil Kumaran2011-04-061-0/+8
|\
| * Issue #10762: Guard against invalid/non-supported format string '%f' on ↵Senthil Kumaran2011-04-061-0/+8
| | | | | | | | Windows. Patch Santoso Wijaya.
| * Merged revisions 87921 via svnmerge fromAlexander Belopolsky2011-02-151-1/+2
| | | | | | | | | | | | | | | | | | | | 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 ........
| * Merged revisions 87919 via svnmerge fromAlexander Belopolsky2011-02-151-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | 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. ........
| * Issue 10814: time.asctime test will now use a valid day with out of range year.Alexander Belopolsky2011-01-031-1/+1
| |
| * Merged revisions 87648,87656 via svnmerge fromAlexander Belopolsky2011-01-021-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ........