bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (GH-14460)

A bug in MSVC UCRT version 17763.615 (which has been fixed in newer versions) is causing test failures in some strptime/strftime tests when the default code page is c65001. This change selectively skips the tests affected by this.
(cherry picked from commit 9cd39b16e2)

Co-authored-by: Paul Monson <paulmon@users.noreply.github.com>
This commit is contained in:
Miss Islington (bot) 2019-07-18 07:17:58 -07:00 committed by GitHub
parent 028f1d2479
commit 652b667b13
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 32 additions and 1 deletions

View file

@ -14,6 +14,7 @@ try:
except ImportError:
_testcapi = None
from test.support import skip_if_buggy_ucrt_strfptime
# Max year is only limited by the size of C int.
SIZEOF_INT = sysconfig.get_config_var('SIZEOF_INT') or 4
@ -250,6 +251,7 @@ class TimeTestCase(unittest.TestCase):
result = time.strftime("%Y %m %d %H %M %S %w %j", (2000,)+(0,)*8)
self.assertEqual(expected, result)
@skip_if_buggy_ucrt_strfptime
def test_strptime(self):
# Should be able to go round-trip from strftime to strptime without
# raising an exception.
@ -672,6 +674,7 @@ class TestStrftime4dyear(_TestStrftimeYear, _Test4dYear, unittest.TestCase):
class TestPytime(unittest.TestCase):
@skip_if_buggy_ucrt_strfptime
@unittest.skipUnless(time._STRUCT_TM_ITEMS == 11, "needs tm_zone support")
def test_localtime_timezone(self):