# 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
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,
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
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]):
import tempfile
import unittest
+from test.support import is_emscripten
+
try:
import _remote_debugging # noqa: F401
from profiling.sampling.pstats_collector import PstatsCollector
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)