https://github.com/python/cpython/commit/0f9107817022f0defac157e3795a4093a32ea320
commit: 0f9107817022f0defac157e3795a4093a32ea320
branch: main
author: Hood Chatham <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2024-12-04T08:06:20+08:00
summary:
gh-127146: Resolve some minor problems in Emscripten tests (#127565)
Adjusts some Emscripten test exclusions regarding strftime, fma, and stack
depth.
files:
M Lib/test/test_marshal.py
M Lib/test/test_math.py
M Lib/test/test_support.py
diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py
index 93b8684c725d24..4ed9f1fc1b8020 100644
--- a/Lib/test/test_marshal.py
+++ b/Lib/test/test_marshal.py
@@ -1,5 +1,5 @@
from test import support
-from test.support import is_apple_mobile, os_helper, requires_debug_ranges
+from test.support import is_apple_mobile, os_helper, requires_debug_ranges,
is_emscripten
from test.support.script_helper import assert_python_ok
import array
import io
@@ -294,7 +294,7 @@ def test_recursion_limit(self):
#if os.name == 'nt' and support.Py_DEBUG:
if os.name == 'nt':
MAX_MARSHAL_STACK_DEPTH = 1000
- elif sys.platform == 'wasi' or is_apple_mobile:
+ elif sys.platform == 'wasi' or is_emscripten or is_apple_mobile:
MAX_MARSHAL_STACK_DEPTH = 1500
else:
MAX_MARSHAL_STACK_DEPTH = 2000
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index fecafd53aa6e6f..6976a5d85da019 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -2722,7 +2722,7 @@ def test_fma_infinities(self):
# gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008
# properly: it doesn't use the right sign when the result is zero.
@unittest.skipIf(
- sys.platform.startswith(("freebsd", "wasi", "netbsd"))
+ sys.platform.startswith(("freebsd", "wasi", "netbsd", "emscripten"))
or (sys.platform == "android" and platform.machine() == "x86_64"),
f"this platform doesn't implement IEE 754-2008 properly")
def test_fma_zero_result(self):
diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py
index 9a3cf140d81241..635ae03a404988 100644
--- a/Lib/test/test_support.py
+++ b/Lib/test/test_support.py
@@ -578,7 +578,7 @@ def test_print_warning(self):
'Warning -- a\nWarning -- b\n')
def test_has_strftime_extensions(self):
- if support.is_emscripten or sys.platform == "win32":
+ if sys.platform == "win32":
self.assertFalse(support.has_strftime_extensions)
else:
self.assertTrue(support.has_strftime_extensions)
_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]