Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix typo in test_time.py | Victor Stinner | 2016-08-17 | 1 | -1/+1 |
| | |||||
* | pytime: add _PyTime_check_mul_overflow() macro to avoid undefined behaviour | Victor Stinner | 2015-09-10 | 1 | -1/+2 |
| | | | | | | | | | | | Overflow test in test_FromSecondsObject() fails on FreeBSD 10.0 buildbot which uses clang. clang implements more aggressive optimization which gives different result than GCC on undefined behaviours. Check if a multiplication will overflow, instead of checking if a multiplicatin had overflowed, to avoid undefined behaviour. Add also debug information if the test on overflow fails. | ||||
* | Fix test_time on platform with 32-bit time_t type | Victor Stinner | 2015-09-10 | 1 | -3/+6 |
| | | | | Filter also values for check_float_rounding(). | ||||
* | Fix test_time on platform with 32-bit time_t type | Victor Stinner | 2015-09-10 | 1 | -5/+18 |
| | | | | Filter values which would overflow when converted to a C time_t type. | ||||
* | Fix test_time on Windows | Victor Stinner | 2015-09-10 | 1 | -9/+24 |
| | | | | | | | * Filter values which would overflow on conversion to the C long type (for timeval.tv_sec). * Adjust also the message of OverflowError on PyTime conversions * test_time: add debug information if a timestamp conversion fails | ||||
* | test_time: rewrite PyTime API rounding tests | Victor Stinner | 2015-09-09 | 1 | -562/+234 |
| | | | | | | | | | | Drop all hardcoded tests. Instead, reimplement each function in Python, usually using decimal.Decimal for the rounding mode. Add much more values to the dataset. Test various timestamp units from picroseconds to seconds, in integer and float. Enhance also _PyTime_AsSecondsDouble(). | ||||
* | Issue #23517: fromtimestamp() and utcfromtimestamp() methods of | Victor Stinner | 2015-09-08 | 1 | -135/+110 |
| | | | | | | | | | | | | datetime.datetime now round microseconds to nearest with ties going to nearest even integer (ROUND_HALF_EVEN), as round(float), instead of rounding towards -Infinity (ROUND_FLOOR). pytime API: replace _PyTime_ROUND_HALF_UP with _PyTime_ROUND_HALF_EVEN. Fix also _PyTime_Divide() for negative numbers. _PyTime_AsTimeval_impl() now reuses _PyTime_Divide() instead of reimplementing rounding modes. | ||||
* | Merge from 3.5 | Steve Dower | 2015-09-07 | 1 | -0/+13 |
|\ | |||||
| * | Issue #24917: time_strftime() buffer over-read. | Steve Dower | 2015-09-07 | 1 | -0/+13 |
| | | |||||
| * | Backing out 09b62202d9b7; the tests fail on Linux, and it needs a re-think. | Larry Hastings | 2015-09-06 | 1 | -6/+0 |
| | | |||||
* | | Issue #24917: Backed out changeset 09b62202d9b7 | Steve Dower | 2015-09-06 | 1 | -6/+0 |
|\ \ | |||||
| * \ | Issue #24917: Backed out changeset 09b62202d9b7 | Steve Dower | 2015-09-06 | 1 | -6/+0 |
| |\ \ | | |/ | |/| | |||||
* | | | Issue #24917: time_strftime() Buffer Over-read. Patch by John Leitch. | Steve Dower | 2015-09-06 | 1 | -0/+6 |
|\ \ \ | |/ / | |||||
| * | | Issue #24917: time_strftime() Buffer Over-read. Patch by John Leitch. | Steve Dower | 2015-09-05 | 1 | -0/+6 |
| | | | |||||
* | | | Issue #23517: Fix implementation of the ROUND_HALF_UP rounding mode in | Victor Stinner | 2015-09-04 | 1 | -6/+7 |
| | | | | | | | | | | | | | | | datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp(). microseconds sign should be kept before rounding. | ||||
* | | | test_time: add tests on HALF_UP rounding mode for _PyTime_ObjectToTime_t() and | Victor Stinner | 2015-09-04 | 1 | -40/+90 |
| | | | | | | | | | | | | _PyTime_ObjectToTimespec() | ||||
* | | | Issue #23517: test_time, skip a test checking a corner case on floating point | Victor Stinner | 2015-09-02 | 1 | -1/+3 |
| | | | | | | | | | | | | rounding | ||||
* | | | test_time: add more tests on HALF_UP rounding mode | Victor Stinner | 2015-09-02 | 1 | -8/+28 |
| | | | |||||
* | | | Issue #23517: Reintroduce unit tests for the old PyTime API since it's still | Victor Stinner | 2015-09-02 | 1 | -0/+154 |
| | | | | | | | | | | | | used. | ||||
* | | | Issue #23517: Add "half up" rounding mode to the _PyTime API | Victor Stinner | 2015-09-01 | 1 | -3/+61 |
|/ / | |||||
* | | Closes #24244: Removes invalid test from test_time | Steve Dower | 2015-06-24 | 1 | -7/+0 |
| | | |||||
* | | Issue #22117: Add a new _PyTime_FromSeconds() function | Victor Stinner | 2015-04-03 | 1 | -0/+7 |
| | | | | | | | | | | Fix also _Py_InitializeEx_Private(): initialize time before initializing import, import_init() uses the _PyTime API (for thread locks). | ||||
* | | Issue #22117, issue #23485: Fix _PyTime_AsMilliseconds() and | Victor Stinner | 2015-04-01 | 1 | -4/+72 |
| | | | | | | | | | | | | _PyTime_AsMicroseconds() rounding. Add also unit tests. | ||||
* | | Issue #22117: Remove _PyTime_ROUND_DOWN and _PyTime_ROUND_UP rounding methods | Victor Stinner | 2015-03-30 | 1 | -87/+13 |
| | | | | | | | | Use _PyTime_ROUND_FLOOR and _PyTime_ROUND_CEILING instead. | ||||
* | | Issue #22117: Add _PyTime_ROUND_CEILING rounding method for timestamps | Victor Stinner | 2015-03-30 | 1 | -4/+61 |
| | | | | | | | | Add also more tests for ROUNd_FLOOR. | ||||
* | | Issue #22117: Fix rounding and implement _PyTime_ROUND_FLOOR in: | Victor Stinner | 2015-03-29 | 1 | -2/+2 |
| | | | | | | | | | | | | - _PyTime_ObjectToTime_t() - _PyTime_ObjectToTimespec() - _PyTime_ObjectToTimeval() | ||||
* | | Issue #22117: Add the new _PyTime_ROUND_FLOOR rounding method for the datetime | Victor Stinner | 2015-03-28 | 1 | -48/+18 |
| | | | | | | | | | | module. time.clock_settime() now uses this rounding method instead of _PyTime_ROUND_DOWN to handle correctly dates before 1970. | ||||
* | | Issue #22117: Write unit tests for _PyTime_AsTimeval() | Victor Stinner | 2015-03-28 | 1 | -0/+38 |
| | | | | | | | | | | | | | | * _PyTime_AsTimeval() now ensures that tv_usec is always positive * _PyTime_AsTimespec() now ensures that tv_nsec is always positive * _PyTime_AsTimeval() now returns an integer on overflow instead of raising an exception | ||||
* | | Issue #22117: The signal modules uses the new _PyTime_t API | Victor Stinner | 2015-03-27 | 1 | -1/+28 |
| | | | | | | | | | | * Add _PyTime_AsTimespec() * Add unit tests for _PyTime_AsTimespec() | ||||
* | | Issue #22117: time.monotonic() now uses the new _PyTime_t API | Victor Stinner | 2015-03-27 | 1 | -10/+54 |
| | | | | | | | | | | | | * Add _PyTime_FromNanoseconds() * Add _PyTime_AsSecondsDouble() * Add unit tests for _PyTime_AsSecondsDouble() | ||||
* | | Issue #22117: Fix rounding in _PyTime_FromSecondsObject() | Victor Stinner | 2015-03-27 | 1 | -79/+173 |
|/ | | | | | | * Rename _PyTime_FromObject() to _PyTime_FromSecondsObject() * Add _PyTime_AsNanosecondsObject() and _testcapi.pytime_fromsecondsobject() * Add unit tests | ||||
* | Issue #11188, #19748: mktime() returns -1 on error. On Linux, the tm_wday field | Victor Stinner | 2014-02-21 | 1 | -0/+7 |
| | | | | | | 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. | ||||
* | Issue #19748: On AIX, time.mktime() now raises an OverflowError for year | Victor Stinner | 2014-02-21 | 1 | -1/+1 |
| | | | | outsize range [1902; 2037]. | ||||
* | Issue #20320: select.select() and select.kqueue.control() now round the timeout | Victor Stinner | 2014-02-16 | 1 | -35/+95 |
| | | | | | | aways from zero, instead of rounding towards zero. It should make test_asyncio more reliable, especially test_timeout_rounding() test. | ||||
* | Issue #20532: Tests which use _testcapi now are marked as CPython only. | Serhiy Storchaka | 2014-02-07 | 1 | -0/+3 |
|\ | |||||
| * | Issue #20532: Tests which use _testcapi now are marked as CPython only. | Serhiy Storchaka | 2014-02-07 | 1 | -0/+3 |
| | | |||||
* | | Issue #20101: Merge with 3.3 | Zachary Ware | 2014-01-02 | 1 | -1/+2 |
|\ \ | |/ | |||||
| * | Issue #20101: Allow test_monotonic to pass on Windows machines on which | Zachary Ware | 2014-01-02 | 1 | -1/+2 |
| | | | | | | | | | | | | time.get_clock_info('monotonic').resolution == 0.015600099999999999 This is just a workaround pending a real resolution to #20101. | ||||
* | | (Merge 3.3) Close #19999: tolerate coarse time when testing time.monotonic() on | Victor Stinner | 2013-12-16 | 1 | -1/+1 |
|\ \ | |/ | | | | | very busy/slow buildbot | ||||
| * | Close #19999: tolerate coarse time when testing time.monotonic() on very | Victor Stinner | 2013-12-16 | 1 | -1/+1 |
| | | | | | | | | busy/slow buildbot | ||||
* | | Issue 19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-08 | 1 | -2/+1 |
|\ \ | |/ | |||||
| * | Issue 19572: More silently skipped tests explicitly skipped. | Zachary Ware | 2013-12-08 | 1 | -2/+1 |
| | | |||||
* | | Issue #19545: Avoid chained exceptions while passing stray % to | Serhiy Storchaka | 2013-11-24 | 1 | -0/+4 |
|\ \ | |/ | | | | | time.strptime(). Initial patch by Claudiu Popa. | ||||
| * | Issue #19545: Avoid chained exceptions while passing stray % to | Serhiy Storchaka | 2013-11-24 | 1 | -0/+4 |
| | | | | | | | | time.strptime(). Initial patch by Claudiu Popa. | ||||
* | | Issue #19715: Ensure that consecutive calls to monotonic() are monotonic | Victor Stinner | 2013-11-22 | 1 | -0/+9 |
|/ | |||||
* | test_time.test_monotonic(): use a longer sleep to try to make the test more ↵ | Victor Stinner | 2013-07-03 | 1 | -2/+2 |
| | | | | reliable | ||||
* | #17690: test_time now works with unittest test discovery. Patch by Zachary ↵ | Ezio Melotti | 2013-04-11 | 1 | -15/+4 |
| | | | | Ware. | ||||
* | #17572: Avoid chained exceptions while passing bad directives to ↵ | Ezio Melotti | 2013-04-03 | 1 | -0/+6 |
| | | | | time.strptime(). Initial patch by Claudiu Popa. | ||||
* | Issue #16714: use 'raise' exceptions, don't 'throw'. | Andrew Svetlov | 2012-12-18 | 1 | -1/+1 |
|\ | | | | | | | Patch by Serhiy Storchaka. | ||||
| * | Issue #16714: use 'raise' exceptions, don't 'throw'. | Andrew Svetlov | 2012-12-18 | 1 | -1/+1 |
| | | | | | | | | Patch by Serhiy Storchaka. |