summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix datetime.fromtimestamp(): check boundsVictor Stinner2017-02-101-0/+36
| | | | | Issue #29100: Fix datetime.fromtimestamp() regression introduced in Python 3.6.0: check minimum and maximum years.
* Issue #28752: Restored the __reduce__() methods of datetime objects.Serhiy Storchaka2016-11-211-0/+7
|
* #27364: fix "incorrect" uses of escape character in the stdlib.R David Murray2016-09-081-2/+2
| | | | | | | And most of the tools. Patch by Emanual Barry, reviewed by me, Serhiy Storchaka, and Martin Panter.
* Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Raymond Hettinger2016-08-301-1/+1
|
* Issue #27834: Avoid overflow error in ZoneInfo.invert().Alexander Belopolsky2016-08-231-3/+3
|
* Issue #24773: Include Tallinn 1999-10-31 transition in tests.Alexander Belopolsky2016-08-171-3/+0
| | | | | Does not appear to be a problem anymore and I cannot figure out why it was skipped in the first place.
* Issue #24773: Skip system tests for transitions in year 2037 and later.Alexander Belopolsky2016-08-121-3/+5
|
* Issue #24773: Fix and speed-up ZoneInfoCompleteTest.Alexander Belopolsky2016-08-111-13/+13
| | | | | | * Read the zone.tab file for the list of zones to exclude the aliases. * Skip Casablanca and El_Aaiun October 2037 transitions.
* Closes #27710: Disallow fold not in [0, 1] in time and datetime constructors.Alexander Belopolsky2016-08-081-0/+5
|
* Closes #27661: Added tzinfo keyword argument to datetime.combine.Alexander Belopolsky2016-08-021-1/+12
|
* Issue 24773: Use the standard Asia/Tehran name in the Iran test.Alexander Belopolsky2016-07-301-1/+1
|
* Issue #24773: Fixed tests failures on systems with 32-bit time_t.Alexander Belopolsky2016-07-261-0/+5
| | | | | | | Several 32-bit systems have issues with transitions in the year 2037. This is a bug in the system C library since time_t does not overflow until 2038, but let's skip tests starting from 2037 to work around those bugs.
* Issue 24773: Make zoneinfo tests more robust. (reapply)Alexander Belopolsky2016-07-251-2/+5
|
* Reindented Lib/test/datetimetester.py.Alexander Belopolsky2016-07-241-2/+2
|
* Issue #24773: Made ZoneInfoCompleteTest a TestSuit.Alexander Belopolsky2016-07-241-18/+21
| | | | This should improve the diagnostic and progress reports.
* Issue 24773: Make zoneinfo tests more robust.Alexander Belopolsky2016-07-231-2/+5
|
* Closes issue #24773: Implement PEP 495 (Local Time Disambiguation).Alexander Belopolsky2016-07-221-7/+800
|
* Issue #27076: Merge spelling from 3.5Martin Panter2016-05-261-2/+2
|\
| * Issue #27076: Doc, comment and tests spelling fixesMartin Panter2016-05-261-2/+2
| | | | | | | | Most fixes to Doc/ and Lib/ directories by Ville Skyttä.
* | mergeAlexander Belopolsky2016-03-251-0/+8
|\ \ | |/
| * Issue#26616:Fixed a bug in datetime.astimezone() method.Alexander Belopolsky2016-03-251-0/+8
| |
* | Issue #19265: Improve test coverage of datetime.tzinfoBerker Peksag2016-03-191-0/+3
|\ \ | |/ | | | | | | | | | | Without the patch, line 1010 of Lib/datetime.py wasn't covered by the test suite. Patch by Colin Williams.
| * Issue #19265: Improve test coverage of datetime.tzinfoBerker Peksag2016-03-191-0/+3
| | | | | | | | | | | | | | Without the patch, line 1010 of Lib/datetime.py wasn't covered by the test suite. Patch by Colin Williams.
* | Revert change 291d47954618Victor Stinner2016-03-121-2/+2
| | | | | | | | | | | | | | | | | | Revert: "Always test datetime.strftime("%4Y") Issue #13305: Always test datetime.datetime.strftime("%4Y") for years < 1900." In fact, strftime("%4Y") fails on most platforms.
* | Always test datetime.strftime("%4Y")Victor Stinner2016-03-111-2/+2
| | | | | | | | Issue #13305: Always test datetime.datetime.strftime("%4Y") for years < 1900.
* | Closes #19475: Added timespec to the datetime.isoformat() method.Alexander Belopolsky2016-03-061-6/+42
| | | | | | | | | | | | | | Added an optional argument timespec to the datetime isoformat() method to choose the precision of the time component. Original patch by Alessandro Cucci.
* | Issue #26198: Make datetime error tests more lenient.Serhiy Storchaka2016-02-081-3/+3
|\ \ | |/
| * Issue #26198: Make datetime error tests more lenient.Serhiy Storchaka2016-02-081-3/+3
| |
* | Issue #20220: Revert time zone test debugging, revision 139c18943d9bMartin Panter2015-11-161-10/+1
| |
* | Issue #9051: Added tests for pickling and copying the timezone objects.Serhiy Storchaka2015-11-161-1/+28
|\ \ | |/
| * Issue #9051: Added tests for pickling and copying the timezone objects.Serhiy Storchaka2015-11-161-1/+28
| |\
| | * Issue #9051: Added tests for pickling and copying the timezone objects.Serhiy Storchaka2015-11-161-1/+28
| | |
| | * Closes issue #23600: Wrong results from tzinfo.fromutc().Alexander Belopolsky2015-09-281-0/+23
| | |
| * | Closes issue #23600: Wrong results from tzinfo.fromutc().Alexander Belopolsky2015-09-281-0/+23
| | |
* | | Issue #25168: Temporary timezone and cache debuggingMartin Panter2015-11-141-1/+10
| | |
* | | Closes issue #23600: Wrong results from tzinfo.fromutc().Alexander Belopolsky2015-09-281-0/+23
|\ \ \
| * \ \ Closes issue #23600: Wrong results from tzinfo.fromutc().Alexander Belopolsky2015-09-281-0/+23
| |\ \ \ | | |/ / | |/| |
| | * | Closes issue #23600: Wrong results from tzinfo.fromutc().Alexander Belopolsky2015-09-281-0/+23
| | |/
| * | Merge 3.4 (datetime rounding)Victor Stinner2015-09-181-6/+17
| |\ \ | | |/
| | * Issue #23517: Fix rounding in fromtimestamp() and utcfromtimestamp() methodsVictor Stinner2015-09-181-4/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | of datetime.datetime: microseconds are now rounded to nearest with ties going to nearest even integer (ROUND_HALF_EVEN), instead of being rounding towards zero (ROUND_DOWN). It's important that these methods use the same rounding mode than datetime.timedelta to keep the property: (datetime(1970,1,1) + timedelta(seconds=t)) == datetime.utcfromtimestamp(t) It also the rounding mode used by round(float) for example. Add more unit tests on the rounding mode in test_datetime.
* | | Oops, fix test_microsecond_rounding()Victor Stinner2015-09-181-2/+2
| | | | | | | | | | | | Test self.theclass, not datetime. Regression introduced by manual tests.
* | | 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.