mirror of
https://github.com/python/cpython.git
synced 2025-08-17 23:31:09 +00:00
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:
parent
028f1d2479
commit
652b667b13
3 changed files with 32 additions and 1 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue