[Python-checkins] python/dist/src/Lib/test test_datetime.py,1.17,1.18
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Tue, 31 Dec 2002 20:18:54 -0800
Update of /cvsroot/python/python/dist/src/Lib/test
In directory sc8-pr-cvs1:/tmp/cvs-serv12126/Lib/test
Modified Files:
test_datetime.py
Log Message:
The failure of the last-second addition to the timezone coversion test is
understood now: it can't work. Added comments explaining why (it's "the
usual"-- unrepresentable hours in local time --but in a slightly different
guise).
Index: test_datetime.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/test/test_datetime.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** test_datetime.py 31 Dec 2002 17:36:56 -0000 1.17
--- test_datetime.py 1 Jan 2003 04:18:51 -0000 1.18
***************
*** 2592,2596 ****
dstoff = datetimetz(2002, 10, 27, 2)
-
# Check a time that's inside DST.
def checkinside(self, dt, tz, utc, dston, dstoff):
--- 2592,2595 ----
***************
*** 2692,2698 ****
self.convert_between_tz_and_utc(Eastern, Pacific)
self.convert_between_tz_and_utc(Pacific, Eastern)
! # XXX These fail!
! #self.convert_between_tz_and_utc(Eastern, Central)
! #self.convert_between_tz_and_utc(Central, Eastern)
--- 2691,2706 ----
self.convert_between_tz_and_utc(Eastern, Pacific)
self.convert_between_tz_and_utc(Pacific, Eastern)
! # OTOH, these fail! Don't enable them. The difficulty is that
! # the edge case tests assume that every hour is representable in
! # the "utc" class. This is always true for a fixed-offset tzinfo
! # class (lke utc_real and utc_fake), but not for Eastern or Central.
! # For these adjacent DST-aware time zones, the range of time offsets
! # tested ends up creating hours in the one that aren't representable
! # in the other. For the same reason, we would see failures in the
! # Eastern vs Pacific tests too if we added 3*HOUR to the list of
! # offset deltas in convert_between_tz_and_utc().
! #
! # self.convert_between_tz_and_utc(Eastern, Central) # can't work
! # self.convert_between_tz_and_utc(Central, Eastern) # can't work