From e3394706b5d02656f72219dcd91b4c25a873062d Mon Sep 17 00:00:00 2001 From: Stuart Bishop Date: Thu, 15 May 2014 08:20:14 +0000 Subject: Update tests to cope with "minimum transitions" now added by zic in 2014c --- src/README.txt | 2 +- src/pytz/tests/test_tzinfo.py | 6 ++++-- 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( -- cgit v1.2.1