]> granicus.if.org Git - python/commit
Added tests to ensure that timetz comparison, and datetimetz
authorTim Peters <tim.peters@gmail.com>
Thu, 26 Dec 2002 05:01:19 +0000 (05:01 +0000)
committerTim Peters <tim.peters@gmail.com>
Thu, 26 Dec 2002 05:01:19 +0000 (05:01 +0000)
commit4c0db788e2500ca2140633d24b0c1c6c6d277a92
treeeb58107486fd2bb3a6cb281ba739742ec57d960d
parent89825958705d1aaf2aa7cdf96f79d2f292f3274c
Added tests to ensure that timetz comparison, and datetimetz
subtraction, work as documented.  In the Python implementation,
they weren't calling utcoffset() if both operands had the same
tzinfo object.  That's fine if it so happens that the shared
tzinfo object returns a fixed offset (independent of operand),
but can give wrong results if that's not so, and the latter
obtains in a tzinfo subclass instance trying to model both
standard and daylight times.  The C implementation was already
doing this "correctly", so we're just adding tests to verify it.
Lib/test/test_datetime.py