[Python-checkins] closes bpo-35171: Fix test_TimeRE_recreation_timezone failure on some systems. (GH-10347)

Miss Islington (bot) webhook-mailer at python.org
Mon Nov 5 23:50:07 EST 2018

commit: d0e3105f7ca3fc54b167edc756ce545cbab0ce95
branch: 3.6
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: GitHub <noreply at github.com>
date: 2018-11-05T20:50:04-08:00

closes bpo-35171: Fix test_TimeRE_recreation_timezone failure on some systems. (GH-10347)

The test depended on '/usr/share/zoneinfo/posixrules' or equivalent
because it set TZ without explicit DST transition rules. At least
on OpenSUSE Tumbleweed that file is linked to '/etc/localtime',
making the test fail with certain local timezones,
such as 'Europe/Moscow' which doesn't have DST transitions since 2011.
(cherry picked from commit f1b9ad3d38c11676b45edcbf2369239bae436e56)

Co-authored-by: Alexey Izbyshev <izbyshev at ispras.ru>

M Lib/test/test_strptime.py

diff --git a/Lib/test/test_strptime.py b/Lib/test/test_strptime.py
index 1438487161f9..92de8110bc6d 100644
--- a/Lib/test/test_strptime.py
+++ b/Lib/test/test_strptime.py
@@ -641,7 +641,7 @@ def test_TimeRE_recreation_locale(self):
             locale.setlocale(locale.LC_TIME, locale_info)
-    @support.run_with_tz('STD-1DST')
+    @support.run_with_tz('STD-1DST,M4.1.0,M10.1.0')
     def test_TimeRE_recreation_timezone(self):
         # The TimeRE instance should be recreated upon changing the timezone.
         oldtzname = time.tzname

More information about the Python-checkins mailing list