@@ -1815,6 +1815,7 @@ def check_killed(self, returncode):
1815
1815
else :
1816
1816
self .assertEqual (- signal .SIGKILL , returncode )
1817
1817
1818
+ @support .requires_subprocess ()
1818
1819
def test_subprocess_exec (self ):
1819
1820
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1820
1821
@@ -1836,6 +1837,7 @@ def test_subprocess_exec(self):
1836
1837
self .check_killed (proto .returncode )
1837
1838
self .assertEqual (b'Python The Winner' , proto .data [1 ])
1838
1839
1840
+ @support .requires_subprocess ()
1839
1841
def test_subprocess_interactive (self ):
1840
1842
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1841
1843
@@ -1863,6 +1865,7 @@ def test_subprocess_interactive(self):
1863
1865
self .loop .run_until_complete (proto .completed )
1864
1866
self .check_killed (proto .returncode )
1865
1867
1868
+ @support .requires_subprocess ()
1866
1869
def test_subprocess_shell (self ):
1867
1870
connect = self .loop .subprocess_shell (
1868
1871
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1879,6 +1882,7 @@ def test_subprocess_shell(self):
1879
1882
self .assertEqual (proto .data [2 ], b'' )
1880
1883
transp .close ()
1881
1884
1885
+ @support .requires_subprocess ()
1882
1886
def test_subprocess_exitcode (self ):
1883
1887
connect = self .loop .subprocess_shell (
1884
1888
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1890,6 +1894,7 @@ def test_subprocess_exitcode(self):
1890
1894
self .assertEqual (7 , proto .returncode )
1891
1895
transp .close ()
1892
1896
1897
+ @support .requires_subprocess ()
1893
1898
def test_subprocess_close_after_finish (self ):
1894
1899
connect = self .loop .subprocess_shell (
1895
1900
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1904,6 +1909,7 @@ def test_subprocess_close_after_finish(self):
1904
1909
self .assertEqual (7 , proto .returncode )
1905
1910
self .assertIsNone (transp .close ())
1906
1911
1912
+ @support .requires_subprocess ()
1907
1913
def test_subprocess_kill (self ):
1908
1914
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1909
1915
@@ -1920,6 +1926,7 @@ def test_subprocess_kill(self):
1920
1926
self .check_killed (proto .returncode )
1921
1927
transp .close ()
1922
1928
1929
+ @support .requires_subprocess ()
1923
1930
def test_subprocess_terminate (self ):
1924
1931
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1925
1932
@@ -1937,6 +1944,7 @@ def test_subprocess_terminate(self):
1937
1944
transp .close ()
1938
1945
1939
1946
@unittest .skipIf (sys .platform == 'win32' , "Don't have SIGHUP" )
1947
+ @support .requires_subprocess ()
1940
1948
def test_subprocess_send_signal (self ):
1941
1949
# bpo-31034: Make sure that we get the default signal handler (killing
1942
1950
# the process). The parent process may have decided to ignore SIGHUP,
@@ -1961,6 +1969,7 @@ def test_subprocess_send_signal(self):
1961
1969
finally :
1962
1970
signal .signal (signal .SIGHUP , old_handler )
1963
1971
1972
+ @support .requires_subprocess ()
1964
1973
def test_subprocess_stderr (self ):
1965
1974
prog = os .path .join (os .path .dirname (__file__ ), 'echo2.py' )
1966
1975
@@ -1982,6 +1991,7 @@ def test_subprocess_stderr(self):
1982
1991
self .assertTrue (proto .data [2 ].startswith (b'ERR:test' ), proto .data [2 ])
1983
1992
self .assertEqual (0 , proto .returncode )
1984
1993
1994
+ @support .requires_subprocess ()
1985
1995
def test_subprocess_stderr_redirect_to_stdout (self ):
1986
1996
prog = os .path .join (os .path .dirname (__file__ ), 'echo2.py' )
1987
1997
@@ -2007,6 +2017,7 @@ def test_subprocess_stderr_redirect_to_stdout(self):
2007
2017
transp .close ()
2008
2018
self .assertEqual (0 , proto .returncode )
2009
2019
2020
+ @support .requires_subprocess ()
2010
2021
def test_subprocess_close_client_stream (self ):
2011
2022
prog = os .path .join (os .path .dirname (__file__ ), 'echo3.py' )
2012
2023
@@ -2041,6 +2052,7 @@ def test_subprocess_close_client_stream(self):
2041
2052
self .loop .run_until_complete (proto .completed )
2042
2053
self .check_killed (proto .returncode )
2043
2054
2055
+ @support .requires_subprocess ()
2044
2056
def test_subprocess_wait_no_same_group (self ):
2045
2057
# start the new process in a new session
2046
2058
connect = self .loop .subprocess_shell (
@@ -2053,6 +2065,7 @@ def test_subprocess_wait_no_same_group(self):
2053
2065
self .assertEqual (7 , proto .returncode )
2054
2066
transp .close ()
2055
2067
2068
+ @support .requires_subprocess ()
2056
2069
def test_subprocess_exec_invalid_args (self ):
2057
2070
async def connect (** kwds ):
2058
2071
await self .loop .subprocess_exec (
@@ -2066,6 +2079,7 @@ async def connect(**kwds):
2066
2079
with self .assertRaises (ValueError ):
2067
2080
self .loop .run_until_complete (connect (shell = True ))
2068
2081
2082
+ @support .requires_subprocess ()
2069
2083
def test_subprocess_shell_invalid_args (self ):
2070
2084
2071
2085
async def connect (cmd = None , ** kwds ):
0 commit comments