Skip to content

Commit 0f91078

Browse files
authored
gh-127146: Resolve some minor problems in Emscripten tests (#127565)
Adjusts some Emscripten test exclusions regarding strftime, fma, and stack depth.
1 parent 12397a5 commit 0f91078

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

Diff for: Lib/test/test_marshal.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
from test import support
2-
from test.support import is_apple_mobile, os_helper, requires_debug_ranges
2+
from test.support import is_apple_mobile, os_helper, requires_debug_ranges, is_emscripten
33
from test.support.script_helper import assert_python_ok
44
import array
55
import io
@@ -294,7 +294,7 @@ def test_recursion_limit(self):
294294
#if os.name == 'nt' and support.Py_DEBUG:
295295
if os.name == 'nt':
296296
MAX_MARSHAL_STACK_DEPTH = 1000
297-
elif sys.platform == 'wasi' or is_apple_mobile:
297+
elif sys.platform == 'wasi' or is_emscripten or is_apple_mobile:
298298
MAX_MARSHAL_STACK_DEPTH = 1500
299299
else:
300300
MAX_MARSHAL_STACK_DEPTH = 2000

Diff for: Lib/test/test_math.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -2722,7 +2722,7 @@ def test_fma_infinities(self):
27222722
# gh-73468: On some platforms, libc fma() doesn't implement IEE 754-2008
27232723
# properly: it doesn't use the right sign when the result is zero.
27242724
@unittest.skipIf(
2725-
sys.platform.startswith(("freebsd", "wasi", "netbsd"))
2725+
sys.platform.startswith(("freebsd", "wasi", "netbsd", "emscripten"))
27262726
or (sys.platform == "android" and platform.machine() == "x86_64"),
27272727
f"this platform doesn't implement IEE 754-2008 properly")
27282728
def test_fma_zero_result(self):

Diff for: Lib/test/test_support.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -578,7 +578,7 @@ def test_print_warning(self):
578578
'Warning -- a\nWarning -- b\n')
579579

580580
def test_has_strftime_extensions(self):
581-
if support.is_emscripten or sys.platform == "win32":
581+
if sys.platform == "win32":
582582
self.assertFalse(support.has_strftime_extensions)
583583
else:
584584
self.assertTrue(support.has_strftime_extensions)

0 commit comments

Comments
 (0)