summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBerker Peksag <berker.peksag@gmail.com>2016-03-19 11:16:32 (GMT)
committerBerker Peksag <berker.peksag@gmail.com>2016-03-19 11:16:32 (GMT)
commite3385b4e3dc1768709940ef0bab88cd1b11215fa (patch)
tree3eff0d99bd004f2294efcf37cb45eef9a6c5292d
parent1cd4ff6284071140826c8cfbb4771e4e395b774a (diff)
downloadcpython-e3385b4e3dc1768709940ef0bab88cd1b11215fa.zip
cpython-e3385b4e3dc1768709940ef0bab88cd1b11215fa.tar.gz
cpython-e3385b4e3dc1768709940ef0bab88cd1b11215fa.tar.bz2
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.
-rw-r--r--Lib/test/datetimetester.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index 63bfed5..7743c67 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()