[Zope3-checkins] CVS: Zope3/src/datetime/tests - test_datetime.py:1.17
Tim Peters
tim.one@comcast.net
Thu, 9 Jan 2003 22:54:52 -0500
Update of /cvs-repository/Zope3/src/datetime/tests
In directory cvs.zope.org:/tmp/cvs-serv22861/src/datetime/tests
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 (& attempting to do so is a detected error in the C
implementation).
=== Zope3/src/datetime/tests/test_datetime.py 1.16 => 1.17 ===
--- Zope3/src/datetime/tests/test_datetime.py:1.16 Wed Jan 8 15:18:25 2003
+++ Zope3/src/datetime/tests/test_datetime.py Thu Jan 9 22:54:49 2003
@@ -1855,7 +1855,7 @@
tinfo = PicklableFixedOffset(-300, 'cookie')
orig = self.theclass(5, 6, 7, tzinfo=tinfo)
state = orig.__getstate__()
- derived = self.theclass()
+ derived = self.theclass(tzinfo=FixedOffset(0, "UTC", 0))
derived.__setstate__(state)
self.assertEqual(orig, derived)
self.failUnless(isinstance(derived.tzinfo, PicklableFixedOffset))