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:52 +02:00
commit 02cce69217
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()