From: Berker Peksag Date: Sat, 19 Mar 2016 11:16:32 +0000 (+0200) Subject: Issue #19265: Improve test coverage of datetime.tzinfo X-Git-Tag: v3.6.0a1~429^2 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=e3385b4e3dc1768709940ef0bab88cd1b11215fa;p=thirdparty%2FPython%2Fcpython.git 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. --- diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py index 63bfed53965f..7743c67c8c33 100644 --- a/Lib/test/datetimetester.py +++ b/Lib/test/datetimetester.py @@ -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()