summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorChristian Heimes <christian@python.org>2022-03-18 11:27:20 (GMT)
committerGitHub <noreply@github.com>2022-03-18 11:27:20 (GMT)
commitd190a9351be577a534a84fd1899f02a9f50f7276 (patch)
tree190b4bf0808d970bd4df50699f69889b9e3813b8 /Lib
parent2217462bda1865a047d358306088682ee6a091ed (diff)
downloadcpython-d190a9351be577a534a84fd1899f02a9f50f7276.zip
cpython-d190a9351be577a534a84fd1899f02a9f50f7276.tar.gz
cpython-d190a9351be577a534a84fd1899f02a9f50f7276.tar.bz2
bpo-47037: Don't test for strftime('%4Y') on Windows (GH-31945)
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/support/__init__.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/Lib/test/support/__init__.py b/Lib/test/support/__init__.py
index 01bb57e..fc1b86b 100644
--- a/Lib/test/support/__init__.py
+++ b/Lib/test/support/__init__.py
@@ -521,10 +521,13 @@ def requires_subprocess():
return unittest.skipUnless(has_subprocess_support, "requires subprocess support")
# Does strftime() support glibc extension like '%4Y'?
-try:
- has_strftime_extensions = time.strftime("%4Y") != "%4Y"
-except ValueError:
- has_strftime_extensions = False
+has_strftime_extensions = False
+if sys.platform != "win32":
+ # bpo-47037: Windows debug builds crash with "Debug Assertion Failed"
+ try:
+ has_strftime_extensions = time.strftime("%4Y") != "%4Y"
+ except ValueError:
+ pass
# Define the URL of a dedicated HTTP server for the network tests.
# The URL must use clear-text HTTP: no redirection to encrypted HTTPS.