Issue #19265: Improve test coverage of datetime.tzinfo

Without the patch, line 1010 of Lib/datetime.py wasn't covered
by the test suite.

Patch by Colin Williams.
This commit is contained in:
Berker Peksag 2016-03-19 13:16:32 +02:00
parent 1cd4ff6284
commit e3385b4e3d
1 changed files with 3 additions and 0 deletions

View File

@ -117,6 +117,9 @@ class PicklableFixedOffset(FixedOffset):
def __init__(self, offset=None, name=None, dstoffset=None):
FixedOffset.__init__(self, offset, name, dstoffset)
def __getstate__(self):
return self.__dict__
class _TZInfo(tzinfo):
def utcoffset(self, datetime_module):
return random.random()