summaryrefslogtreecommitdiffstats
path: root/Lib/test/datetimetester.py
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-03-15 09:41:04 (GMT)
committerGitHub <noreply@github.com>2022-03-15 09:41:04 (GMT)
commit2cf7f865f099db11cc6903b334d9c376610313e8 (patch)
treebd2f0b9fe770e4d68b34d97a2ade8aee6cb63144 /Lib/test/datetimetester.py
parentd8066b420b888591f485d132e62979d07abfc3f4 (diff)
downloadcpython-2cf7f865f099db11cc6903b334d9c376610313e8.zip
cpython-2cf7f865f099db11cc6903b334d9c376610313e8.tar.gz
cpython-2cf7f865f099db11cc6903b334d9c376610313e8.tar.bz2
bpo-46587: Skip tests if strftime does not support glibc extension (GH-31873)
Co-authored-by: Victor Stinner <vstinner@python.org>
Diffstat (limited to 'Lib/test/datetimetester.py')
-rw-r--r--Lib/test/datetimetester.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/test/datetimetester.py b/Lib/test/datetimetester.py
index df3764d..e208a29 100644
--- a/Lib/test/datetimetester.py
+++ b/Lib/test/datetimetester.py
@@ -1676,7 +1676,8 @@ class TestDate(HarmlessMixedComparison, unittest.TestCase):
# Year 42 returns '42', not padded
self.assertEqual(d.strftime("%Y"), '%d' % y)
# '0042' is obtained anyway
- self.assertEqual(d.strftime("%4Y"), '%04d' % y)
+ if support.has_strftime_extensions:
+ self.assertEqual(d.strftime("%4Y"), '%04d' % y)
def test_replace(self):
cls = self.theclass