Skip to content

Commit 3c53904

Browse files
committed
fixup! fixup! Wait for interpreter to initialize in subprocess
1 parent 8261aa6 commit 3c53904

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

Lib/test/test_sample_profiler.py

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1768,7 +1768,7 @@ def test_cli_module_argument_parsing(self):
17681768

17691769
profile.sample.main()
17701770

1771-
mock_popen.assert_called_once_with([sys.executable, "-m", "mymodule"])
1771+
mock_popen.assert_called_once_with((sys.executable, "-m", "mymodule"))
17721772
mock_sample.assert_called_once_with(
17731773
12345,
17741774
sort=2, # default sort (sort_value from args.sort)
@@ -1798,9 +1798,9 @@ def test_cli_module_with_arguments(self):
17981798

17991799
profile.sample.main()
18001800

1801-
mock_popen.assert_called_once_with([
1801+
mock_popen.assert_called_once_with((
18021802
sys.executable, "-m", "mymodule", "arg1", "arg2", "--flag"
1803-
])
1803+
))
18041804
mock_sample.assert_called_once_with(
18051805
12345,
18061806
sort=2,
@@ -1830,7 +1830,7 @@ def test_cli_script_argument_parsing(self):
18301830

18311831
profile.sample.main()
18321832

1833-
mock_popen.assert_called_once_with([sys.executable, "myscript.py"])
1833+
mock_popen.assert_called_once_with((sys.executable, "myscript.py"))
18341834
mock_sample.assert_called_once_with(
18351835
12345,
18361836
sort=2,
@@ -1860,9 +1860,9 @@ def test_cli_script_with_arguments(self):
18601860

18611861
profile.sample.main()
18621862

1863-
mock_popen.assert_called_once_with([
1863+
mock_popen.assert_called_once_with((
18641864
sys.executable, "myscript.py", "arg1", "arg2", "--flag"
1865-
])
1865+
))
18661866

18671867
def test_cli_mutually_exclusive_pid_module(self):
18681868
test_args = ["profile.sample", "-p", "12345", "-m", "mymodule"]
@@ -1959,9 +1959,9 @@ def test_cli_script_with_profiler_options(self):
19591959

19601960
profile.sample.main()
19611961

1962-
mock_popen.assert_called_once_with([
1962+
mock_popen.assert_called_once_with((
19631963
sys.executable, "myscript.py", "scriptarg"
1964-
])
1964+
))
19651965
# Verify profiler options were passed correctly
19661966
mock_sample.assert_called_once_with(
19671967
12345,
@@ -2006,9 +2006,9 @@ def test_cli_long_module_option(self):
20062006

20072007
profile.sample.main()
20082008

2009-
mock_popen.assert_called_once_with([
2009+
mock_popen.assert_called_once_with((
20102010
sys.executable, "-m", "mymodule", "arg1",
2011-
])
2011+
))
20122012

20132013
def test_cli_complex_script_arguments(self):
20142014
test_args = [
@@ -2029,10 +2029,10 @@ def test_cli_complex_script_arguments(self):
20292029

20302030
profile.sample.main()
20312031

2032-
mock_popen.assert_called_once_with([
2032+
mock_popen.assert_called_once_with((
20332033
sys.executable, "script.py",
20342034
"--input", "file.txt", "-v", "--output=/tmp/out", "positional",
2035-
])
2035+
))
20362036

20372037
def test_cli_collapsed_format_validation(self):
20382038
"""Test that CLI properly validates incompatible options with collapsed format."""

0 commit comments

Comments
 (0)