https://github.com/python/cpython/commit/b54a1d272e719bc327481ea3ce14c8381d29aaf8
commit: b54a1d272e719bc327481ea3ce14c8381d29aaf8
branch: main
author: Russell Keith-Magee <[email protected]>
committer: freakboy3742 <[email protected]>
date: 2026-01-09T05:47:38+08:00
summary:

Add Emscripten test skips for recently added tests. (#143551)

Some recent changes introduced tests that can't run on Emscripten.
This change adds test skips for those tests.

files:
M Lib/test/test_grammar.py
M Lib/test/test_profiling/test_sampling_profiler/test_cli.py
M Lib/test/test_profiling/test_sampling_profiler/test_collectors.py

diff --git a/Lib/test/test_grammar.py b/Lib/test/test_grammar.py
index cfb24a5c457820..ebcd98a0a37776 100644
--- a/Lib/test/test_grammar.py
+++ b/Lib/test/test_grammar.py
@@ -1,8 +1,6 @@
 # Python test set -- part 1, grammar.
 # This just tests whether the parser accepts them all.
 
-from test.support import check_syntax_error, skip_wasi_stack_overflow
-from test.support import import_helper
 import annotationlib
 import inspect
 import unittest
@@ -18,6 +16,12 @@
 import typing
 from test.typinganndata import ann_module2
 import test
+from test.support import (
+    check_syntax_error,
+    import_helper,
+    skip_emscripten_stack_overflow,
+    skip_wasi_stack_overflow,
+)
 from test.support.numbers import (
     VALID_UNDERSCORE_LITERALS,
     INVALID_UNDERSCORE_LITERALS,
@@ -250,6 +254,7 @@ def test_eof_error(self):
             self.assertIn("was never closed", str(cm.exception))
 
     @skip_wasi_stack_overflow()
+    @skip_emscripten_stack_overflow()
     def test_max_level(self):
         # Macro defined in Parser/lexer/state.h
         MAXLEVEL = 200
diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_cli.py 
b/Lib/test/test_profiling/test_sampling_profiler/test_cli.py
index f187f6c51d88e2..0d92bd1796e9af 100644
--- a/Lib/test/test_profiling/test_sampling_profiler/test_cli.py
+++ b/Lib/test/test_profiling/test_sampling_profiler/test_cli.py
@@ -714,6 +714,7 @@ def test_run_nonexistent_module_exits_cleanly(self):
             with self.assertRaisesRegex(SamplingModuleNotFoundError, "Module 
'[\\w/.]+' not found."):
                 main()
 
+    @unittest.skipIf(is_emscripten, "subprocess not available")
     def test_cli_attach_nonexistent_pid(self):
         fake_pid = "99999"
         with mock.patch("sys.argv", ["profiling.sampling.cli", "attach", 
fake_pid]):
diff --git a/Lib/test/test_profiling/test_sampling_profiler/test_collectors.py 
b/Lib/test/test_profiling/test_sampling_profiler/test_collectors.py
index ae336ccdb941ce..8e6afa91e89daf 100644
--- a/Lib/test/test_profiling/test_sampling_profiler/test_collectors.py
+++ b/Lib/test/test_profiling/test_sampling_profiler/test_collectors.py
@@ -7,6 +7,8 @@
 import tempfile
 import unittest
 
+from test.support import is_emscripten
+
 try:
     import _remote_debugging  # noqa: F401
     from profiling.sampling.pstats_collector import PstatsCollector
@@ -599,6 +601,7 @@ def test_gecko_collector_basic(self):
         self.assertGreater(stack_table["length"], 0)
         self.assertGreater(len(stack_table["frame"]), 0)
 
+    @unittest.skipIf(is_emscripten, "threads not available")
     def test_gecko_collector_export(self):
         """Test Gecko profile export functionality."""
         gecko_out = tempfile.NamedTemporaryFile(suffix=".json", delete=False)

_______________________________________________
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]

Reply via email to