summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
Commit message (Collapse)AuthorAgeFilesLines
...
* | | cleanup datetime codeVictor Stinner2015-09-081-1/+1
| | | | | | | | | | | | remove scories of round half up code and debug code.
* | | Issue #23517: fromtimestamp() and utcfromtimestamp() methods ofVictor Stinner2015-09-081-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Revert change 0eb8c182131e:Victor Stinner2015-09-081-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | """Issue #23517: datetime.timedelta constructor now rounds microseconds to nearest with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older than 3.3, instead of rounding to nearest with ties going to nearest even integer (ROUND_HALF_EVEN).""" datetime.timedelta uses rounding mode ROUND_HALF_EVEN again.
* | | Closes Issue#22241: timezone.utc name is now plain 'UTC', not 'UTC-00:00'.Alexander Belopolsky2015-09-061-1/+2
| | |
* | | Issue #23517: Skip a datetime test on WindowsVictor Stinner2015-09-051-3/+3
| | | | | | | | | | | | The test calls gmtime(-1)/localtime(-1) which is not supported on Windows.
* | | Issue #23517: Fix implementation of the ROUND_HALF_UP rounding mode inVictor Stinner2015-09-041-2/+10
| | | | | | | | | | | | | | | datetime.datetime.fromtimestamp() and datetime.datetime.utcfromtimestamp(). microseconds sign should be kept before rounding.
* | | Issue #23517: fromtimestamp() and utcfromtimestamp() methods ofVictor Stinner2015-09-031-5/+6
| | | | | | | | | | | | | | | | | | datetime.datetime now round microseconds to nearest with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older than 3.3, instead of rounding towards -Infinity (ROUND_FLOOR).
* | | Issue #23517: datetime.timedelta constructor now rounds microseconds to nearestVictor Stinner2015-09-021-9/+5
|/ / | | | | | | | | | | with ties going away from zero (ROUND_HALF_UP), as Python 2 and Python older than 3.3, instead of rounding to nearest with ties going to nearest even integer (ROUND_HALF_EVEN).
* | Issue #21741: Update 147 test modules to use test discovery.Zachary Ware2015-04-131-4/+1
| | | | | | | | | | | | | | I have compared output between pre- and post-patch runs of these tests to make sure there's nothing missing and nothing broken, on both Windows and Linux. The only differences I found were actually tests that were previously *not* run.
* | Fixes #23521: Corrected pure python implementation of timedelta division.Alexander Belopolsky2015-02-281-0/+34
|\ \ | |/ | | | | | | * Eliminated OverflowError from timedelta * float for some floats; * Corrected rounding in timedlta true division.
| * Fixes #23521: Corrected pure python implementation of timedelta division.Alexander Belopolsky2015-02-281-0/+34
| | | | | | | | | | * Eliminated OverflowError from timedelta * float for some floats; * Corrected rounding in timedlta true division.
* | Issue #23326: Removed __ne__ implementations. Since fixing default __ne__Serhiy Storchaka2015-01-311-2/+0
| | | | | | | | implementation in issue #21408 they are redundant.
* | Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-5/+6
|\ \ | |/
| * Issue #22777: Test pickling with all protocols.Serhiy Storchaka2014-12-151-5/+6
| |
* | Make test_datetime a better citizen (issue #22540)Antoine Pitrou2014-10-031-1/+1
| |
* | Closes issue #20858: Enhancements/fixes to pure-python datetime moduleAlexander Belopolsky2014-09-281-5/+89
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch brings the pure-python datetime more in-line with the C module. Patch contributed by Brian Kearns, a PyPy developer. PyPy project has been running these modifications in PyPy2 stdlib. This commit includes: - General PEP8/cleanups; - Better testing of argument types passed to constructors; - Removal of duplicate operations; - Optimization of timedelta creation; - Caching the result of __hash__ like the C accelerator; - Enhancements/bug fixes in tests.
* | mergeRaymond Hettinger2014-07-251-0/+11
|\ \ | |/
| * Issue #22044: Fixed premature DECREF in call_tzinfo_method.Raymond Hettinger2014-07-251-0/+11
| |
* | remove the ability of datetime.time to be considered false (closes #13936)Benjamin Peterson2014-03-201-16/+5
|/
* Issue 19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-081-0/+1
|\
| * Issue 19572: More silently skipped tests explicitly skipped.Zachary Ware2013-12-081-0/+1
| |
* | Issue #19605: Use specific asserts in datetime testsSerhiy Storchaka2013-11-171-79/+80
|\ \ | |/
| * Issue #19605: Use specific asserts in datetime testsSerhiy Storchaka2013-11-171-79/+80
| |
* | #18466: merge with 3.3.Ezio Melotti2013-08-171-1/+1
|\ \ | |/
| * #18466: fix more typos. Patch by Févry Thibault.Ezio Melotti2013-08-171-1/+1
| |
* | Fixes #8860: Round half-microseconds to even in the timedelta constructor.Alexander Belopolsky2013-08-041-0/+4
|/ | | | (Original patch by Mark Dickinson.)
* Closes #15973: fix a segmentation fault when comparing timezone objects.Georg Brandl2012-09-221-0/+2
|
* Issue #9527: tm_gmtoff has 'correct' sign.Alexander Belopolsky2012-06-221-2/+4
|
* Issue #9527: datetime.astimezone() method will now supply a classAlexander Belopolsky2012-06-221-2/+2
| | | | | timezone instance corresponding to the system local timezone when called with no arguments.
* Issue #9527: datetime.astimezone() method will now supply a classAlexander Belopolsky2012-06-221-3/+18
| | | | | timezone instance corresponding to the system local timezone when called with no arguments.
* Issue #15006: Allow equality comparison between naive and aware timeAlexander Belopolsky2012-06-161-6/+6
| | | | or datetime objects.
* Relax datetime.timestamp() test around DST changeAlexander Belopolsky2012-06-081-1/+1
|
* Relax datetime.timestamp() test around DST changeAlexander Belopolsky2012-06-081-3/+3
|
* Issue #2736: Added datetime.timestamp() method.Alexander Belopolsky2012-06-081-0/+36
|
* Issue #14180: TestDateTime.test_microsecond_rounding() handles localtime() andVictor Stinner2012-03-131-10/+15
| | | | gmtime() failure on Windows
* Close #14180: Factorize code to convert a number of seconds to time_t, ↵Victor Stinner2012-03-131-7/+27
| | | | | | | | | | | | | 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.
* Merge 3.2: Issue #13703 plus some related test suite fixes.Georg Brandl2012-02-201-2/+0
|\
| * Fix obscure failures of datetime-related tests due to the datetime tests ↵Georg Brandl2012-02-201-2/+0
| | | | | | | | failing to restore the system state completely after testing the pure-Python versions.
* | Strengthen the tests for format '%Y', in relation with issue #13305.Florent Xicluna2011-11-011-2/+10
| |
* | Relax %Y test.Alexander Belopolsky2011-05-021-2/+2
| |
* | Issue #11930: Remove year >= 1000 limitation from datetime.strftime.Alexander Belopolsky2011-05-021-6/+4
|/ | | | Patch by Victor Stinner.
* Issue #11576: Fixed timedelta subtraction glitch on big timedelta valuesAlexander Belopolsky2011-04-061-0/+6
|
* #11565: Merge with 3.1.Ezio Melotti2011-03-161-1/+1
|
* Issue #1777412: extended year range of strftime down to 1000.Alexander Belopolsky2011-01-081-3/+3
|
* Issue 10825: Minor updates to the test suite.Raymond Hettinger2011-01-061-1/+1
|
* Issue #6697: Fixed instances of _PyUnicode_AsString() result not checked for ↵Alexander Belopolsky2010-12-081-1/+7
| | | | NULL
* Issue #10624: Use support.requires_IEEE_754 in all appropriate tests.Eric Smith2010-12-041-7/+2
|
* Issue 9183: Intern UTC timezone.Alexander Belopolsky2010-10-141-1/+3
|
* Fixed microsecond rounding in python version of utcfromtimestampAlexander Belopolsky2010-09-211-4/+4
|
* #9440: Remove borderline test case that fails based on unpredictable ↵Georg Brandl2010-07-311-4/+0
| | | | conditions such as compiler flags.