]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
closes bpo-35171: Fix test_TimeRE_recreation_timezone failure on some systems. (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 6 Nov 2018 04:59:07 +0000 (20:59 -0800)
committerGitHub <noreply@github.com>
Tue, 6 Nov 2018 04:59:07 +0000 (20:59 -0800)
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@ispras.ru>
Lib/test/test_strptime.py

index 48ad5daec402cb2d3873d6da11a93c11e6784551..a7af85a6d55675ac933cef5eb28ea14f4ed87ab7 100644 (file)
@@ -580,7 +580,7 @@ class CacheTests(unittest.TestCase):
         finally:
             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