20
20
from test .support .os_helper import unlink
21
21
from test .support import force_not_colorized_test_class , SHORT_TIMEOUT
22
22
from test .support .socket_helper import find_unused_port
23
- from test .support import requires_subprocess
23
+ from test .support import requires_subprocess , is_emscripten
24
24
25
25
PROCESS_VM_READV_SUPPORTED = False
26
26
@@ -1792,6 +1792,7 @@ def _verify_coordinator_command(self, mock_popen, expected_target_args):
1792
1792
# cwd is coordinator_cmd[4]
1793
1793
self .assertEqual (coordinator_cmd [5 :], expected_target_args )
1794
1794
1795
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
1795
1796
def test_cli_module_argument_parsing (self ):
1796
1797
test_args = ["profile.sample" , "-m" , "mymodule" ]
1797
1798
@@ -1818,6 +1819,7 @@ def test_cli_module_argument_parsing(self):
1818
1819
realtime_stats = False ,
1819
1820
)
1820
1821
1822
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
1821
1823
def test_cli_module_with_arguments (self ):
1822
1824
test_args = ["profile.sample" , "-m" , "mymodule" , "arg1" , "arg2" , "--flag" ]
1823
1825
@@ -1844,6 +1846,7 @@ def test_cli_module_with_arguments(self):
1844
1846
realtime_stats = False ,
1845
1847
)
1846
1848
1849
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
1847
1850
def test_cli_script_argument_parsing (self ):
1848
1851
test_args = ["profile.sample" , "myscript.py" ]
1849
1852
@@ -1870,6 +1873,7 @@ def test_cli_script_argument_parsing(self):
1870
1873
realtime_stats = False ,
1871
1874
)
1872
1875
1876
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
1873
1877
def test_cli_script_with_arguments (self ):
1874
1878
test_args = ["profile.sample" , "myscript.py" , "arg1" , "arg2" , "--flag" ]
1875
1879
@@ -1938,6 +1942,7 @@ def test_cli_no_target_specified(self):
1938
1942
error_msg = mock_stderr .getvalue ()
1939
1943
self .assertIn ("one of the arguments" , error_msg )
1940
1944
1945
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
1941
1946
def test_cli_module_with_profiler_options (self ):
1942
1947
test_args = [
1943
1948
"profile.sample" , "-i" , "1000" , "-d" , "30" , "-a" ,
@@ -1967,6 +1972,7 @@ def test_cli_module_with_profiler_options(self):
1967
1972
realtime_stats = False ,
1968
1973
)
1969
1974
1975
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
1970
1976
def test_cli_script_with_profiler_options (self ):
1971
1977
"""Test script with various profiler options."""
1972
1978
test_args = [
@@ -2013,6 +2019,7 @@ def test_cli_empty_module_name(self):
2013
2019
error_msg = mock_stderr .getvalue ()
2014
2020
self .assertIn ("argument -m/--module: expected one argument" , error_msg )
2015
2021
2022
+ @unittest .skipIf (is_emscripten , "socket.SO_REUSEADDR does not exist" )
2016
2023
def test_cli_long_module_option (self ):
2017
2024
test_args = ["profile.sample" , "--module" , "mymodule" , "arg1" ]
2018
2025
0 commit comments