summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Bishop <stuart@stuartbishop.net>2014-05-15 08:20:14 +0000
committerStuart Bishop <stuart@stuartbishop.net>2014-05-15 08:20:14 +0000
commite3394706b5d02656f72219dcd91b4c25a873062d (patch)
treedf281cb5597626f94d40cbebac57866f50a2d9f3
parent7cfa84225cb4cea506e1158e9b3ddef5cc5f716c (diff)
downloadpytz-e3394706b5d02656f72219dcd91b4c25a873062d.tar.gz
Update tests to cope with "minimum transitions" now added by zic in 2014c
-rw-r--r--src/README.txt2
-rw-r--r--src/pytz/tests/test_tzinfo.py6
2 files changed, 5 insertions, 3 deletions
diff --git a/src/README.txt b/src/README.txt
index eba6cf9..b645715 100644
--- a/src/README.txt
+++ b/src/README.txt
@@ -88,7 +88,7 @@ Unfortunately using the tzinfo argument of the standard datetime
constructors ''does not work'' with pytz for many timezones.
>>> datetime(2002, 10, 27, 12, 0, 0, tzinfo=amsterdam).strftime(fmt)
-'2002-10-27 12:00:00 AMT+0020'
+'2002-10-27 12:00:00 LMT+0020'
It is safe for timezones without daylight saving transitions though, such
as UTC:
diff --git a/src/pytz/tests/test_tzinfo.py b/src/pytz/tests/test_tzinfo.py
index 5dd7a39..c996a5c 100644
--- a/src/pytz/tests/test_tzinfo.py
+++ b/src/pytz/tests/test_tzinfo.py
@@ -183,7 +183,8 @@ class PicklingTest(unittest.TestCase):
"cpytz\n_p\np1\n(S'US/Eastern'\np2\nI-18000\n"
"I0\nS'EST'\np3\ntRp4\n."
))
- east2 = pytz.timezone('US/Eastern')
+ east2 = pytz.timezone('US/Eastern').localize(
+ datetime(2006, 1, 1)).tzinfo
self.assertTrue(east1 is east2)
# Confirm changes in name munging between 2006j and 2007c cause
@@ -191,7 +192,8 @@ class PicklingTest(unittest.TestCase):
pap1 = pickle.loads(_byte_string(
"cpytz\n_p\np1\n(S'America/Port_minus_au_minus_Prince'"
"\np2\nI-17340\nI0\nS'PPMT'\np3\ntRp4\n."))
- pap2 = pytz.timezone('America/Port-au-Prince')
+ pap2 = pytz.timezone('America/Port-au-Prince').localize(
+ datetime(1910, 1, 1)).tzinfo
self.assertTrue(pap1 is pap2)
gmt1 = pickle.loads(_byte_string(