Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Lib/test/test_grammar.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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,
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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]):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
Loading