Antoine Pitrou
392f4139b3
Make test_datetime a better citizen (issue #22540 )
11 years ago
Alexander Belopolsky
6c7a4182f5
Closes issue #20858 : Enhancements/fixes to pure-python datetime module
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.
11 years ago
Raymond Hettinger
5a2146a2fd
Issue #22044 : Fixed premature DECREF in call_tzinfo_method.
12 years ago
Benjamin Peterson
ee6bdc07d6
remove the ability of datetime.time to be considered false ( closes #13936 )
12 years ago
Zachary Ware
9fe6d86709
Issue 19572: More silently skipped tests explicitly skipped.
12 years ago
Serhiy Storchaka
3df4dcceb9
Issue #19605 : Use specific asserts in datetime tests
12 years ago
Ezio Melotti
85a8629d21
#18466 : fix more typos. Patch by Févry Thibault.
13 years ago
Alexander Belopolsky
790d269d39
Fixes #8860 : Round half-microseconds to even in the timedelta constructor.
(Original patch by Mark Dickinson.)
13 years ago
Alexander Belopolsky
3ec153681e
Issue #15973 : Fixed segmentation fault on timezone comparison to other types.
13 years ago
Georg Brandl
0085a24075
Closes #15973 : fix a segmentation fault when comparing timezone objects.
13 years ago
Alexander Belopolsky
93c9cd07b6
Issue #9527 : tm_gmtoff has 'correct' sign.
14 years ago
Alexander Belopolsky
ff493c9c46
Issue #9527 : datetime.astimezone() method will now supply a class
timezone instance corresponding to the system local timezone when
called with no arguments.
14 years ago
Alexander Belopolsky
fdc860f310
Issue #9527 : datetime.astimezone() method will now supply a class
timezone instance corresponding to the system local timezone when
called with no arguments.
14 years ago
Alexander Belopolsky
0831382d69
Issue #15006 : Allow equality comparison between naive and aware time
or datetime objects.
14 years ago
Alexander Belopolsky
f6f56183ee
Relax datetime.timestamp() test around DST change
14 years ago
Alexander Belopolsky
0c687e5e88
Relax datetime.timestamp() test around DST change
14 years ago
Alexander Belopolsky
a4415141da
Issue #2736 : Added datetime.timestamp() method.
14 years ago
Victor Stinner
8050ca9c6f
Issue #14180 : TestDateTime.test_microsecond_rounding() handles localtime() and
gmtime() failure on Windows
14 years ago
Victor Stinner
5d272cc6a2
Close #14180 : Factorize code to convert a number of seconds to time_t, 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.
14 years ago
Georg Brandl
e5a0e0a75f
Fix obscure failures of datetime-related tests due to the datetime tests failing to restore the system state completely after testing the pure-Python versions.
14 years ago
Florent Xicluna
49ce06858b
Strengthen the tests for format '%Y', in relation with issue #13305 .
14 years ago
Alexander Belopolsky
4409493d73
Relax %Y test.
15 years ago
Alexander Belopolsky
89da349b7b
Issue #11930 : Remove year >= 1000 limitation from datetime.strftime.
Patch by Victor Stinner.
15 years ago
Alexander Belopolsky
b6f5ec7370
Issue #11576 : Fixed timedelta subtraction glitch on big timedelta values
15 years ago
Alexander Belopolsky
b8bb4664fc
Issue #1777412 : extended year range of strftime down to 1000.
15 years ago
Raymond Hettinger
7beae8a0d5
Issue 10825: Minor updates to the test suite.
15 years ago
Alexander Belopolsky
e239d23e8c
Issue #6697 : Fixed instances of _PyUnicode_AsString() result not checked for NULL
15 years ago
Eric Smith
3ab08cadae
Issue #10624 : Use support.requires_IEEE_754 in all appropriate tests.
15 years ago
Alexander Belopolsky
1bcbaab15a
Issue 9183: Intern UTC timezone.
15 years ago
Alexander Belopolsky
3e62f78c4e
Fixed microsecond rounding in python version of utcfromtimestamp
16 years ago
Georg Brandl
38005e8156
#9440 : Remove borderline test case that fails based on unpredictable conditions such as compiler flags.
16 years ago
Alexander Belopolsky
aeb039863d
Make python version of fromtimestamp behave more like C.
16 years ago
Alexander Belopolsky
cf86e368eb
Issue #7989 : Added pure python implementation of the datetime module.
16 years ago
Alexander Belopolsky
a11d8c03a4
Issue #9000 : datetime.timezone objects now have eval-friendly repr.
16 years ago
Alexander Belopolsky
d87e932f51
Added two more test cases for datetime
16 years ago
Alexander Belopolsky
f5c7bc841b
Merged revisions 82578 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82578 | alexander.belopolsky | 2010-07-05 11:05:33 -0400 (Mon, 05 Jul 2010) | 1 line
Added more tests for utctimetuple()
........
16 years ago
Alexander Belopolsky
f34e82ef49
Added more tests for utctimetuple()
16 years ago
Alexander Belopolsky
5e307de6e0
Added more test cases
16 years ago
Alexander Belopolsky
33b94c9fa9
Test future pickle protocols. Thanks Antoine Pitrou for suggestion.
16 years ago
Alexander Belopolsky
1b7046b99e
Issue #9051 : Instances of timezone class can now be pickled.
16 years ago
Alexander Belopolsky
f4b552e7d5
Merged revisions 82152 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r82152 | alexander.belopolsky | 2010-06-22 10:07:33 -0400 (Tue, 22 Jun 2010) | 1 line
Added more test cases
........
16 years ago
Alexander Belopolsky
1b40292592
Added more test cases
16 years ago
Alexander Belopolsky
75f94c210a
Issue #9005 : Prevent utctimetuple() from producing year 0 or year 10,000.
16 years ago
Alexander Belopolsky
f568218e7e
Issue #6641 : Original commit for this issue, r82053, introduced a
regression making datetime subclass' strptime return datetime rather
than subclass instances. Fixed this bug and a few typos.
16 years ago
Alexander Belopolsky
ca94f55758
Issue #6641 : The datetime.strptime method now supports the %z directive.
16 years ago
Alexander Belopolsky
05cc2030e5
Minor changes to the choice of assert methods
16 years ago
Alexander Belopolsky
4e749a1113
Issue #5094 : The ``datetime`` module now has a simple concrete class
implementing ``datetime.tzinfo`` interface.
16 years ago
Alexander Belopolsky
1790bc43bf
Issue #1289118 : datetime.timedelta objects can now be multiplied by float
and divided by float and int objects.
16 years ago
Alexander Belopolsky
5ca31edd0e
Merged revisions 81560 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81560 | alexander.belopolsky | 2010-05-26 16:48:30 -0400 (Wed, 26 May 2010) | 10 lines
Merged revisions 81559 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81559 | alexander.belopolsky | 2010-05-26 16:45:37 -0400 (Wed, 26 May 2010) | 3 lines
Issue #7879 : Skip negative timestamps test on any Windows platform
using unittest.skipIf decorator.
........
................
16 years ago
Alexander Belopolsky
2f4087d713
Merged revisions 81556 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
................
r81556 | alexander.belopolsky | 2010-05-26 16:00:12 -0400 (Wed, 26 May 2010) | 10 lines
Merged revisions 81555 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81555 | alexander.belopolsky | 2010-05-26 15:43:16 -0400 (Wed, 26 May 2010) | 3 lines
Issue #7879 : Do not test negative timestamps on any Windows platform
including Windows CE.
........
................
16 years ago