mirror of
https://github.com/python/cpython.git
synced 2025-08-27 12:16:04 +00:00
Got rid of the timetz type entirely. This was a bit trickier than I
hoped it would be, but not too bad. A test had to change: time.__setstate__() can no longer add a non-None tzinfo member to a time object that didn't already have one, since storage for a tzinfo member doesn't exist in that case.
This commit is contained in:
parent
a5e8bb94e5
commit
37f398282b
3 changed files with 369 additions and 504 deletions
|
@ -1857,7 +1857,7 @@ class TestTimeTZ(TestTime, TZInfoBase):
|
|||
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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue