@@ -1894,6 +1894,7 @@ def check_killed(self, returncode):
1894
1894
else :
1895
1895
self .assertEqual (- signal .SIGKILL , returncode )
1896
1896
1897
+ @support .requires_subprocess ()
1897
1898
def test_subprocess_exec (self ):
1898
1899
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1899
1900
@@ -1915,6 +1916,7 @@ def test_subprocess_exec(self):
1915
1916
self .check_killed (proto .returncode )
1916
1917
self .assertEqual (b'Python The Winner' , proto .data [1 ])
1917
1918
1919
+ @support .requires_subprocess ()
1918
1920
def test_subprocess_interactive (self ):
1919
1921
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1920
1922
@@ -1942,6 +1944,7 @@ def test_subprocess_interactive(self):
1942
1944
self .loop .run_until_complete (proto .completed )
1943
1945
self .check_killed (proto .returncode )
1944
1946
1947
+ @support .requires_subprocess ()
1945
1948
def test_subprocess_shell (self ):
1946
1949
connect = self .loop .subprocess_shell (
1947
1950
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1958,6 +1961,7 @@ def test_subprocess_shell(self):
1958
1961
self .assertEqual (proto .data [2 ], b'' )
1959
1962
transp .close ()
1960
1963
1964
+ @support .requires_subprocess ()
1961
1965
def test_subprocess_exitcode (self ):
1962
1966
connect = self .loop .subprocess_shell (
1963
1967
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1969,6 +1973,7 @@ def test_subprocess_exitcode(self):
1969
1973
self .assertEqual (7 , proto .returncode )
1970
1974
transp .close ()
1971
1975
1976
+ @support .requires_subprocess ()
1972
1977
def test_subprocess_close_after_finish (self ):
1973
1978
connect = self .loop .subprocess_shell (
1974
1979
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1983,6 +1988,7 @@ def test_subprocess_close_after_finish(self):
1983
1988
self .assertEqual (7 , proto .returncode )
1984
1989
self .assertIsNone (transp .close ())
1985
1990
1991
+ @support .requires_subprocess ()
1986
1992
def test_subprocess_kill (self ):
1987
1993
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1988
1994
@@ -1999,6 +2005,7 @@ def test_subprocess_kill(self):
1999
2005
self .check_killed (proto .returncode )
2000
2006
transp .close ()
2001
2007
2008
+ @support .requires_subprocess ()
2002
2009
def test_subprocess_terminate (self ):
2003
2010
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
2004
2011
@@ -2016,6 +2023,7 @@ def test_subprocess_terminate(self):
2016
2023
transp .close ()
2017
2024
2018
2025
@unittest .skipIf (sys .platform == 'win32' , "Don't have SIGHUP" )
2026
+ @support .requires_subprocess ()
2019
2027
def test_subprocess_send_signal (self ):
2020
2028
# bpo-31034: Make sure that we get the default signal handler (killing
2021
2029
# the process). The parent process may have decided to ignore SIGHUP,
@@ -2040,6 +2048,7 @@ def test_subprocess_send_signal(self):
2040
2048
finally :
2041
2049
signal .signal (signal .SIGHUP , old_handler )
2042
2050
2051
+ @support .requires_subprocess ()
2043
2052
def test_subprocess_stderr (self ):
2044
2053
prog = os .path .join (os .path .dirname (__file__ ), 'echo2.py' )
2045
2054
@@ -2061,6 +2070,7 @@ def test_subprocess_stderr(self):
2061
2070
self .assertTrue (proto .data [2 ].startswith (b'ERR:test' ), proto .data [2 ])
2062
2071
self .assertEqual (0 , proto .returncode )
2063
2072
2073
+ @support .requires_subprocess ()
2064
2074
def test_subprocess_stderr_redirect_to_stdout (self ):
2065
2075
prog = os .path .join (os .path .dirname (__file__ ), 'echo2.py' )
2066
2076
@@ -2086,6 +2096,7 @@ def test_subprocess_stderr_redirect_to_stdout(self):
2086
2096
transp .close ()
2087
2097
self .assertEqual (0 , proto .returncode )
2088
2098
2099
+ @support .requires_subprocess ()
2089
2100
def test_subprocess_close_client_stream (self ):
2090
2101
prog = os .path .join (os .path .dirname (__file__ ), 'echo3.py' )
2091
2102
@@ -2120,6 +2131,7 @@ def test_subprocess_close_client_stream(self):
2120
2131
self .loop .run_until_complete (proto .completed )
2121
2132
self .check_killed (proto .returncode )
2122
2133
2134
+ @support .requires_subprocess ()
2123
2135
def test_subprocess_wait_no_same_group (self ):
2124
2136
# start the new process in a new session
2125
2137
connect = self .loop .subprocess_shell (
@@ -2132,6 +2144,7 @@ def test_subprocess_wait_no_same_group(self):
2132
2144
self .assertEqual (7 , proto .returncode )
2133
2145
transp .close ()
2134
2146
2147
+ @support .requires_subprocess ()
2135
2148
def test_subprocess_exec_invalid_args (self ):
2136
2149
async def connect (** kwds ):
2137
2150
await self .loop .subprocess_exec (
@@ -2145,6 +2158,7 @@ async def connect(**kwds):
2145
2158
with self .assertRaises (ValueError ):
2146
2159
self .loop .run_until_complete (connect (shell = True ))
2147
2160
2161
+ @support .requires_subprocess ()
2148
2162
def test_subprocess_shell_invalid_args (self ):
2149
2163
2150
2164
async def connect (cmd = None , ** kwds ):
0 commit comments