bpo-47037: Don't test for strftime('%4Y') on Windows (GH-31945)

This commit is contained in:
Christian Heimes 2022-03-18 13:27:20 +02:00 committed by GitHub
parent 2217462bda
commit d190a9351b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 4 deletions

View File

@ -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.

View File

@ -0,0 +1,2 @@
Skip ``strftime("%4Y")`` feature test on Windows. It can cause an assertion
error in debug builds.