@@ -1730,6 +1730,7 @@ def check_killed(self, returncode):
1730
1730
else :
1731
1731
self .assertEqual (- signal .SIGKILL , returncode )
1732
1732
1733
+ @support .requires_subprocess ()
1733
1734
def test_subprocess_exec (self ):
1734
1735
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1735
1736
@@ -1750,6 +1751,7 @@ def test_subprocess_exec(self):
1750
1751
self .check_killed (proto .returncode )
1751
1752
self .assertEqual (b'Python The Winner' , proto .data [1 ])
1752
1753
1754
+ @support .requires_subprocess ()
1753
1755
def test_subprocess_interactive (self ):
1754
1756
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1755
1757
@@ -1777,6 +1779,7 @@ def test_subprocess_interactive(self):
1777
1779
self .loop .run_until_complete (proto .completed )
1778
1780
self .check_killed (proto .returncode )
1779
1781
1782
+ @support .requires_subprocess ()
1780
1783
def test_subprocess_shell (self ):
1781
1784
connect = self .loop .subprocess_shell (
1782
1785
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1793,6 +1796,7 @@ def test_subprocess_shell(self):
1793
1796
self .assertEqual (proto .data [2 ], b'' )
1794
1797
transp .close ()
1795
1798
1799
+ @support .requires_subprocess ()
1796
1800
def test_subprocess_exitcode (self ):
1797
1801
connect = self .loop .subprocess_shell (
1798
1802
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1804,6 +1808,7 @@ def test_subprocess_exitcode(self):
1804
1808
self .assertEqual (7 , proto .returncode )
1805
1809
transp .close ()
1806
1810
1811
+ @support .requires_subprocess ()
1807
1812
def test_subprocess_close_after_finish (self ):
1808
1813
connect = self .loop .subprocess_shell (
1809
1814
functools .partial (MySubprocessProtocol , self .loop ),
@@ -1817,6 +1822,7 @@ def test_subprocess_close_after_finish(self):
1817
1822
self .assertEqual (7 , proto .returncode )
1818
1823
self .assertIsNone (transp .close ())
1819
1824
1825
+ @support .requires_subprocess ()
1820
1826
def test_subprocess_kill (self ):
1821
1827
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1822
1828
@@ -1833,6 +1839,7 @@ def test_subprocess_kill(self):
1833
1839
self .check_killed (proto .returncode )
1834
1840
transp .close ()
1835
1841
1842
+ @support .requires_subprocess ()
1836
1843
def test_subprocess_terminate (self ):
1837
1844
prog = os .path .join (os .path .dirname (__file__ ), 'echo.py' )
1838
1845
@@ -1850,6 +1857,7 @@ def test_subprocess_terminate(self):
1850
1857
transp .close ()
1851
1858
1852
1859
@unittest .skipIf (sys .platform == 'win32' , "Don't have SIGHUP" )
1860
+ @support .requires_subprocess ()
1853
1861
def test_subprocess_send_signal (self ):
1854
1862
# bpo-31034: Make sure that we get the default signal handler (killing
1855
1863
# the process). The parent process may have decided to ignore SIGHUP,
@@ -1873,6 +1881,7 @@ def test_subprocess_send_signal(self):
1873
1881
finally :
1874
1882
signal .signal (signal .SIGHUP , old_handler )
1875
1883
1884
+ @support .requires_subprocess ()
1876
1885
def test_subprocess_stderr (self ):
1877
1886
prog = os .path .join (os .path .dirname (__file__ ), 'echo2.py' )
1878
1887
@@ -1894,6 +1903,7 @@ def test_subprocess_stderr(self):
1894
1903
self .assertTrue (proto .data [2 ].startswith (b'ERR:test' ), proto .data [2 ])
1895
1904
self .assertEqual (0 , proto .returncode )
1896
1905
1906
+ @support .requires_subprocess ()
1897
1907
def test_subprocess_stderr_redirect_to_stdout (self ):
1898
1908
prog = os .path .join (os .path .dirname (__file__ ), 'echo2.py' )
1899
1909
@@ -1918,6 +1928,7 @@ def test_subprocess_stderr_redirect_to_stdout(self):
1918
1928
transp .close ()
1919
1929
self .assertEqual (0 , proto .returncode )
1920
1930
1931
+ @support .requires_subprocess ()
1921
1932
def test_subprocess_close_client_stream (self ):
1922
1933
prog = os .path .join (os .path .dirname (__file__ ), 'echo3.py' )
1923
1934
@@ -1951,6 +1962,7 @@ def test_subprocess_close_client_stream(self):
1951
1962
self .loop .run_until_complete (proto .completed )
1952
1963
self .check_killed (proto .returncode )
1953
1964
1965
+ @support .requires_subprocess ()
1954
1966
def test_subprocess_wait_no_same_group (self ):
1955
1967
# start the new process in a new session
1956
1968
connect = self .loop .subprocess_shell (
@@ -1963,6 +1975,7 @@ def test_subprocess_wait_no_same_group(self):
1963
1975
self .assertEqual (7 , proto .returncode )
1964
1976
transp .close ()
1965
1977
1978
+ @support .requires_subprocess ()
1966
1979
def test_subprocess_exec_invalid_args (self ):
1967
1980
async def connect (** kwds ):
1968
1981
await self .loop .subprocess_exec (
@@ -1976,6 +1989,7 @@ async def connect(**kwds):
1976
1989
with self .assertRaises (ValueError ):
1977
1990
self .loop .run_until_complete (connect (shell = True ))
1978
1991
1992
+ @support .requires_subprocess ()
1979
1993
def test_subprocess_shell_invalid_args (self ):
1980
1994
1981
1995
async def connect (cmd = None , ** kwds ):
0 commit comments