diff options
author | Paul Monson <paulmon@users.noreply.github.com> | 2019-07-18 13:56:59 (GMT) |
---|---|---|
committer | Paul Ganssle <pganssle@users.noreply.github.com> | 2019-07-18 13:56:59 (GMT) |
commit | 9cd39b16e2655f748f7aa8d20bca4812da00ba70 (patch) | |
tree | 4f812aedf58d207e3c4d41968f534bff8551daba /Lib/test/test_time.py | |
parent | 1b3892243433da7eae7f5f3a4f98f13d309c8926 (diff) | |
download | cpython-9cd39b16e2655f748f7aa8d20bca4812da00ba70.zip cpython-9cd39b16e2655f748f7aa8d20bca4812da00ba70.tar.gz cpython-9cd39b16e2655f748f7aa8d20bca4812da00ba70.tar.bz2 |
bpo-37552: Skip failing tests in strptime/strftime with UCRT version 17763.615 (#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.
Diffstat (limited to 'Lib/test/test_time.py')
-rw-r--r-- | Lib/test/test_time.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index f790d43..8d8d31e 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -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): |