bpo-46587: Skip tests if strftime does not support glibc extension (GH-31873)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Christian Heimes 2022-03-15 11:41:04 +02:00 committed by GitHub
parent d8066b420b
commit 2cf7f865f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 21 deletions

View file

@ -622,6 +622,9 @@ class _TestStrftimeYear:
def yearstr(self, y):
return time.strftime('%Y', (y,) + (0,) * 8)
@unittest.skipUnless(
support.has_strftime_extensions, "requires strftime extension"
)
def test_4dyear(self):
# Check that we can return the zero padded value.
if self._format == '%04d':