OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-pytz?expand=0&rev=55
76 lines
2.6 KiB
Diff
76 lines
2.6 KiB
Diff
From 838d7f06908c14352b0d4f3c5b656d0d95abaf9e Mon Sep 17 00:00:00 2001
|
|
From: Andreas Stieger <astieger@suse.com>
|
|
Date: Wed, 15 Mar 2017 22:23:14 +0100
|
|
Subject: [PATCH] test fixes for 2017a numeric zone name changes
|
|
References: boo#1027705 https://github.com/stub42/pytz/pull/1
|
|
https://github.com/stub42/pytz/pull/1/commits/838d7f06908c14352b0d4f3c5b656d0d95abaf9e
|
|
|
|
---
|
|
src/pytz/tests/test_tzinfo.py | 14 +++++++-------
|
|
1 file changed, 7 insertions(+), 7 deletions(-)
|
|
|
|
diff --git a/src/pytz/tests/test_tzinfo.py b/src/pytz/tests/test_tzinfo.py
|
|
index 4d26d9ff..21812f6b 100644
|
|
--- a/src/pytz/tests/test_tzinfo.py
|
|
+++ b/src/pytz/tests/test_tzinfo.py
|
|
@@ -501,7 +501,7 @@ class NoumeaHistoryStartTestCase(USEasternDSTStartTestCase):
|
|
'dst': timedelta(0),
|
|
}
|
|
after = {
|
|
- 'tzname': 'NCT',
|
|
+ 'tzname': '+11',
|
|
'utcoffset': timedelta(hours=11),
|
|
'dst': timedelta(0),
|
|
}
|
|
@@ -512,12 +512,12 @@ class NoumeaDSTEndTestCase(USEasternDSTStartTestCase):
|
|
tzinfo = pytz.timezone('Pacific/Noumea')
|
|
transition_time = datetime(1997, 3, 1, 15, 00, 00, tzinfo=UTC)
|
|
before = {
|
|
- 'tzname': 'NCST',
|
|
+ 'tzname': '+12',
|
|
'utcoffset': timedelta(hours=12),
|
|
'dst': timedelta(hours=1),
|
|
}
|
|
after = {
|
|
- 'tzname': 'NCT',
|
|
+ 'tzname': '+11',
|
|
'utcoffset': timedelta(hours=11),
|
|
'dst': timedelta(0),
|
|
}
|
|
@@ -541,7 +541,7 @@ class TahitiTestCase(USEasternDSTStartTestCase):
|
|
'dst': timedelta(0),
|
|
}
|
|
after = {
|
|
- 'tzname': 'TAHT',
|
|
+ 'tzname': '-10',
|
|
'utcoffset': timedelta(hours=-10),
|
|
'dst': timedelta(0),
|
|
}
|
|
@@ -554,12 +554,12 @@ class SamoaInternationalDateLineChange(USEasternDSTStartTestCase):
|
|
tzinfo = pytz.timezone('Pacific/Apia')
|
|
transition_time = datetime(2011, 12, 30, 10, 0, 0, tzinfo=UTC)
|
|
before = {
|
|
- 'tzname': 'SDT',
|
|
+ 'tzname': '-10',
|
|
'utcoffset': timedelta(hours=-10),
|
|
'dst': timedelta(hours=1),
|
|
}
|
|
after = {
|
|
- 'tzname': 'WSDT',
|
|
+ 'tzname': '+14',
|
|
'utcoffset': timedelta(hours=14),
|
|
'dst': timedelta(hours=1),
|
|
}
|
|
@@ -611,7 +611,7 @@ class LocalTestCase(unittest.TestCase):
|
|
self.assertEqual(loc_time.strftime('%Z%z'), 'NST+0120')
|
|
|
|
loc_time = loc_tz.localize(datetime(1940, 5, 10, 0, 0, 0))
|
|
- self.assertEqual(loc_time.strftime('%Z%z'), 'NET+0020')
|
|
+ self.assertEqual(loc_time.strftime('%Z%z'), '+0020+0020')
|
|
|
|
loc_time = loc_tz.localize(datetime(1940, 5, 20, 0, 0, 0))
|
|
self.assertEqual(loc_time.strftime('%Z%z'), 'CEST+0200')
|
|
--
|
|
2.12.0
|
|
|