summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.6] bpo-32746: Fix multiple typos (GH-5144) (GH-5522)Terry Jan Reedy2018-02-041-1/+1
| | | | | | | | | Fix typos found by codespell in docs, docstrings, and comments. Fixes for the following files were in post-3.6 code and not backported: Lib/ctypes/_aix.py (new), Lib/test/test_concurrent_futures.py, Modules/_asynciomodule.c, Modules/_pickle.c, Objects/obmalloc.c. (cherry picked from commit c3d9508ff22ece9a96892b628dd5813e2fb0cd80)
* bpo-31222: Make (datetime|date|time).replace return subclass type in Pure ↵Miss Islington (bot)2017-11-101-0/+14
| | | | | Python (GH-4176) (#4356) (cherry picked from commit 191e993365ac3206f46132dcf46236471ec54bfa)
* bpo-31752: Fix possible crash in timedelta constructor called with custom ↵Miss Islington (bot)2017-10-231-0/+20
| | | | | | integers. (GH-3947) (#4086) Bad remainder in divmod() in intermediate calculations caused an assertion failure. (cherry picked from commit 4ffd4653a7ec9c97775472276cf5e159e2366bb2)
* [3.6] bpo-31293: Fix crashes in truediv and mul of a timedelta by a float ↵Miss Islington (bot)2017-09-191-0/+20
| | | | | with a bad as_integer_ratio() method. (GH-3227) (#3654) (cherry picked from commit 865e4b4f630e2ae91e61239258abb58b488f1d65)
* [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) (#2816)Utkarsh Upadhyay2017-07-261-5/+7
| | | | | | | | | | | | * [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) Only C implementation was tested. (cherry picked from commit 287c5594edc1ca08db64d1f4739cc36bfe75ae75) * [3.6] bpo-30822: Fix testing of datetime module. (GH-2530) (GH-2783) Only C implementation was tested.. (cherry picked from commit 287c5594edc1ca08db64d1f4739cc36bfe75ae75)
* bpo-29953: Fix memory leaks in the replace() method of datetime and t… (#933)Serhiy Storchaka2017-03-311-0/+5
| | | | | objects when pass out of bound fold argument. (cherry picked from commit 314d6fca36a4eaa0541218431d14804fadec6488)
* Fix test_datetime on WindowsVictor Stinner2017-02-101-2/+3
| | | | | Issue #29100: On Windows, datetime.datetime.fromtimestamp(min_ts) fails with an OSError in test_timestamp_limits().
* Fix test_datetime on system with 32-bit time_tVictor Stinner2017-02-101-3/+7
| | | | Issue #29100: Catch OverflowError in the new test_timestamp_limits() test.
* 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.