]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-127146: Resolve some minor problems in Emscripten tests (#127565)
authorHood Chatham <roberthoodchatham@gmail.com>
Wed, 4 Dec 2024 00:06:20 +0000 (01:06 +0100)
committerGitHub <noreply@github.com>
Wed, 4 Dec 2024 00:06:20 +0000 (08:06 +0800)
Adjusts some Emscripten test exclusions regarding strftime, fma, and stack depth.

Lib/test/test_marshal.py
Lib/test/test_math.py
Lib/test/test_support.py

index 93b8684c725d2420b4533dd992c5d55213189dd4..4ed9f1fc1b8020b6430d6844471362b08ff9a82b 100644 (file)
@@ -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 @@ class BugsTestCase(unittest.TestCase):
         #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
index fecafd53aa6e6f1a3552a44ee72df7fe5be0c717..6976a5d85da01994ae3a95afd2632b2d6ae24b25 100644 (file)
@@ -2722,7 +2722,7 @@ class FMATests(unittest.TestCase):
     # 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):
index 9a3cf140d81241720d365b660e4cedee94715ab1..635ae03a404988e3204efeab5a33d39a1be80d6f 100644 (file)
@@ -578,7 +578,7 @@ class TestSupport(unittest.TestCase):
                                  '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)