Skip to content
Merged
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: 8 additions & 1 deletion Lib/test/test_sample_profiler.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
from test.support.os_helper import unlink
from test.support import force_not_colorized_test_class, SHORT_TIMEOUT
from test.support.socket_helper import find_unused_port
from test.support import requires_subprocess
from test.support import requires_subprocess, is_emscripten

PROCESS_VM_READV_SUPPORTED = False

Expand Down Expand Up @@ -1792,6 +1792,7 @@ def _verify_coordinator_command(self, mock_popen, expected_target_args):
# cwd is coordinator_cmd[4]
self.assertEqual(coordinator_cmd[5:], expected_target_args)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_module_argument_parsing(self):
test_args = ["profile.sample", "-m", "mymodule"]

Expand All @@ -1818,6 +1819,7 @@ def test_cli_module_argument_parsing(self):
realtime_stats=False,
)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_module_with_arguments(self):
test_args = ["profile.sample", "-m", "mymodule", "arg1", "arg2", "--flag"]

Expand All @@ -1844,6 +1846,7 @@ def test_cli_module_with_arguments(self):
realtime_stats=False,
)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_script_argument_parsing(self):
test_args = ["profile.sample", "myscript.py"]

Expand All @@ -1870,6 +1873,7 @@ def test_cli_script_argument_parsing(self):
realtime_stats=False,
)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_script_with_arguments(self):
test_args = ["profile.sample", "myscript.py", "arg1", "arg2", "--flag"]

Expand Down Expand Up @@ -1938,6 +1942,7 @@ def test_cli_no_target_specified(self):
error_msg = mock_stderr.getvalue()
self.assertIn("one of the arguments", error_msg)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_module_with_profiler_options(self):
test_args = [
"profile.sample", "-i", "1000", "-d", "30", "-a",
Expand Down Expand Up @@ -1967,6 +1972,7 @@ def test_cli_module_with_profiler_options(self):
realtime_stats=False,
)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_script_with_profiler_options(self):
"""Test script with various profiler options."""
test_args = [
Expand Down Expand Up @@ -2013,6 +2019,7 @@ def test_cli_empty_module_name(self):
error_msg = mock_stderr.getvalue()
self.assertIn("argument -m/--module: expected one argument", error_msg)

@unittest.skipIf(is_emscripten, "socket.SO_REUSEADDR does not exist")
def test_cli_long_module_option(self):
test_args = ["profile.sample", "--module", "mymodule", "arg1"]

Expand Down
Loading