[Python-checkins] python/nondist/sandbox/datetime test_datetime.py,1.96,1.97
tim_one@users.sourceforge.net
tim_one@users.sourceforge.net
Thu, 09 Jan 2003 19:52:28 -0800
Update of /cvsroot/python/python/nondist/sandbox/datetime
In directory sc8-pr-cvs1:/tmp/cvs-serv27471
Modified Files:
test_datetime.py
Log Message:
Patching a test for compatibility with the 2.3 C implementation: because
a time object has two different allocations under the covers (depending
on whether it has a non-None tzinfo member), time.__setstate__() can no
longer add a non-None tzinfo member to a time object that didn't already
have one.
Index: test_datetime.py
===================================================================
RCS file: /cvsroot/python/python/nondist/sandbox/datetime/test_datetime.py,v
retrieving revision 1.96
retrieving revision 1.97
diff -C2 -d -r1.96 -r1.97
*** test_datetime.py 8 Jan 2003 19:43:46 -0000 1.96
--- test_datetime.py 10 Jan 2003 03:52:25 -0000 1.97
***************
*** 1856,1860 ****
orig = self.theclass(5, 6, 7, tzinfo=tinfo)
state = orig.__getstate__()
! derived = self.theclass()
derived.__setstate__(state)
self.assertEqual(orig, derived)
--- 1856,1860 ----
orig = self.theclass(5, 6, 7, tzinfo=tinfo)
state = orig.__getstate__()
! derived = self.theclass(tzinfo=FixedOffset(0, "UTC", 0))
derived.__setstate__(state)
self.assertEqual(orig, derived)