@@ -811,6 +811,7 @@ def is_env_var_to_ignore(n):
811
811
if not is_env_var_to_ignore (k )]
812
812
self .assertEqual (child_env_names , [])
813
813
814
+ @unittest .skipIf (sys .platform == "win32" , "TODO: RUSTPYTHON, null byte is not checked" )
814
815
def test_invalid_cmd (self ):
815
816
# null character in the command name
816
817
cmd = sys .executable + '\0 '
@@ -956,6 +957,7 @@ def test_communicate_returns(self):
956
957
self .assertEqual (stdout , None )
957
958
self .assertEqual (stderr , None )
958
959
960
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
959
961
def test_communicate_pipe_buf (self ):
960
962
# communicate() with writes larger than pipe_buf
961
963
# This test will probably deadlock rather than fail, if
@@ -995,6 +997,8 @@ def test_writes_before_communicate(self):
995
997
self .assertEqual (stdout , b"bananasplit" )
996
998
self .assertEqual (stderr , b"" )
997
999
1000
+ # TODO: RUSTPYTHON
1001
+ @unittest .expectedFailure
998
1002
def test_universal_newlines_and_text (self ):
999
1003
args = [
1000
1004
sys .executable , "-c" ,
@@ -1034,6 +1038,7 @@ def test_universal_newlines_and_text(self):
1034
1038
self .assertEqual (p .stdout .read (),
1035
1039
"line4\n line5\n line6\n line7\n line8" )
1036
1040
1041
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
1037
1042
def test_universal_newlines_communicate (self ):
1038
1043
# universal newlines through communicate()
1039
1044
p = subprocess .Popen ([sys .executable , "-c" ,
@@ -1085,6 +1090,7 @@ def test_universal_newlines_communicate_input_none(self):
1085
1090
p .communicate ()
1086
1091
self .assertEqual (p .returncode , 0 )
1087
1092
1093
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
1088
1094
def test_universal_newlines_communicate_stdin_stdout_stderr (self ):
1089
1095
# universal newlines through communicate(), with stdin, stdout, stderr
1090
1096
p = subprocess .Popen ([sys .executable , "-c" ,
@@ -1113,6 +1119,8 @@ def test_universal_newlines_communicate_stdin_stdout_stderr(self):
1113
1119
# to stderr at exit of subprocess.
1114
1120
self .assertTrue (stderr .startswith ("eline2\n eline6\n eline7\n " ))
1115
1121
1122
+ # TODO: RUSTPYTHON
1123
+ @unittest .expectedFailure
1116
1124
def test_universal_newlines_communicate_encodings (self ):
1117
1125
# Check that universal newlines mode works for various encodings,
1118
1126
# in particular for encodings in the UTF-16 and UTF-32 families.
@@ -1135,6 +1143,8 @@ def test_universal_newlines_communicate_encodings(self):
1135
1143
stdout , stderr = popen .communicate (input = '' )
1136
1144
self .assertEqual (stdout , '1\n 2\n 3\n 4' )
1137
1145
1146
+ # TODO: RUSTPYTHON
1147
+ @unittest .expectedFailure
1138
1148
def test_communicate_errors (self ):
1139
1149
for errors , expected in [
1140
1150
('ignore' , '' ),
@@ -1274,12 +1284,15 @@ def _test_bufsize_equal_one(self, line, expected, universal_newlines):
1274
1284
self .assertEqual (p .returncode , 0 )
1275
1285
self .assertEqual (read_line , expected )
1276
1286
1287
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
1277
1288
def test_bufsize_equal_one_text_mode (self ):
1278
1289
# line is flushed in text mode with bufsize=1.
1279
1290
# we should get the full line in return
1280
1291
line = "line\n "
1281
1292
self ._test_bufsize_equal_one (line , line , universal_newlines = True )
1282
1293
1294
+ # TODO: RUSTPYTHON
1295
+ @unittest .expectedFailure
1283
1296
def test_bufsize_equal_one_binary_mode (self ):
1284
1297
# line is not flushed in binary mode with bufsize=1.
1285
1298
# we should get empty response
@@ -1452,6 +1465,7 @@ def test_handles_closed_on_exception(self):
1452
1465
self .assertFalse (os .path .exists (ofname ))
1453
1466
self .assertFalse (os .path .exists (efname ))
1454
1467
1468
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
1455
1469
def test_communicate_epipe (self ):
1456
1470
# Issue 10963: communicate() should hide EPIPE
1457
1471
p = subprocess .Popen (ZERO_RETURN_CMD ,
@@ -1482,6 +1496,7 @@ def test_repr(self):
1482
1496
p .returncode = code
1483
1497
self .assertEqual (repr (p ), sx )
1484
1498
1499
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
1485
1500
def test_communicate_epipe_only_stdin (self ):
1486
1501
# Issue 10963: communicate() should hide EPIPE
1487
1502
p = subprocess .Popen (ZERO_RETURN_CMD ,
@@ -1490,6 +1505,8 @@ def test_communicate_epipe_only_stdin(self):
1490
1505
p .wait ()
1491
1506
p .communicate (b"x" * 2 ** 20 )
1492
1507
1508
+ # TODO: RUSTPYTHON
1509
+ @unittest .expectedFailure
1493
1510
@unittest .skipUnless (hasattr (signal , 'SIGUSR1' ),
1494
1511
"Requires signal.SIGUSR1" )
1495
1512
@unittest .skipUnless (hasattr (os , 'kill' ),
@@ -1539,6 +1556,8 @@ def test_file_not_found_includes_filename(self):
1539
1556
subprocess .call (['/opt/nonexistent_binary' , 'with' , 'some' , 'args' ])
1540
1557
self .assertEqual (c .exception .filename , '/opt/nonexistent_binary' )
1541
1558
1559
+ # TODO: RUSTPYTHON
1560
+ @unittest .expectedFailure
1542
1561
@unittest .skipIf (mswindows , "behavior currently not supported on Windows" )
1543
1562
def test_file_not_found_with_bad_cwd (self ):
1544
1563
with self .assertRaises (FileNotFoundError ) as c :
@@ -1739,6 +1758,8 @@ def test_run_with_shell_timeout_and_capture_output(self):
1739
1758
msg = "TimeoutExpired was delayed! Bad traceback:\n ```\n "
1740
1759
f"{ stacks } ```" )
1741
1760
1761
+ # TODO: RUSTPYTHON
1762
+ @unittest .expectedFailure
1742
1763
def test_encoding_warning (self ):
1743
1764
code = textwrap .dedent ("""\
1744
1765
from subprocess import *
@@ -1785,6 +1806,8 @@ def _get_chdir_exception(self):
1785
1806
self ._nonexistent_dir )
1786
1807
return desired_exception
1787
1808
1809
+ # TODO: RUSTPYTHON
1810
+ @unittest .expectedFailure
1788
1811
def test_exception_cwd (self ):
1789
1812
"""Test error in the child raised in the parent for a bad cwd."""
1790
1813
desired_exception = self ._get_chdir_exception ()
@@ -1800,6 +1823,8 @@ def test_exception_cwd(self):
1800
1823
else :
1801
1824
self .fail ("Expected OSError: %s" % desired_exception )
1802
1825
1826
+ # TODO: RUSTPYTHON
1827
+ @unittest .expectedFailure
1803
1828
def test_exception_bad_executable (self ):
1804
1829
"""Test error in the child raised in the parent for a bad executable."""
1805
1830
desired_exception = self ._get_chdir_exception ()
@@ -1815,6 +1840,8 @@ def test_exception_bad_executable(self):
1815
1840
else :
1816
1841
self .fail ("Expected OSError: %s" % desired_exception )
1817
1842
1843
+ # TODO: RUSTPYTHON
1844
+ @unittest .expectedFailure
1818
1845
def test_exception_bad_args_0 (self ):
1819
1846
"""Test error in the child raised in the parent for a bad args[0]."""
1820
1847
desired_exception = self ._get_chdir_exception ()
@@ -1879,6 +1906,8 @@ def bad_error(*args):
1879
1906
1880
1907
self .assertIn (repr (error_data ), str (e .exception ))
1881
1908
1909
+ # TODO: RUSTPYTHON
1910
+ @unittest .expectedFailure
1882
1911
@unittest .skipIf (not os .path .exists ('/proc/self/status' ),
1883
1912
"need /proc/self/status" )
1884
1913
def test_restore_signals (self ):
@@ -1919,6 +1948,8 @@ def test_start_new_session(self):
1919
1948
child_sid = int (output )
1920
1949
self .assertNotEqual (parent_sid , child_sid )
1921
1950
1951
+ # TODO: RUSTPYTHON
1952
+ @unittest .expectedFailure
1922
1953
@unittest .skipUnless (hasattr (os , 'setpgid' ) and hasattr (os , 'getpgid' ),
1923
1954
'no setpgid or getpgid on platform' )
1924
1955
def test_process_group_0 (self ):
@@ -1937,6 +1968,8 @@ def test_process_group_0(self):
1937
1968
child_pgid = int (output )
1938
1969
self .assertNotEqual (parent_pgid , child_pgid )
1939
1970
1971
+ # TODO: RUSTPYTHON
1972
+ @unittest .expectedFailure
1940
1973
@unittest .skipUnless (hasattr (os , 'setreuid' ), 'no setreuid on platform' )
1941
1974
def test_user (self ):
1942
1975
# For code coverage of the user parameter. We don't care if we get an
@@ -1994,6 +2027,8 @@ def test_user_error(self):
1994
2027
with self .assertRaises (ValueError ):
1995
2028
subprocess .check_call (ZERO_RETURN_CMD , user = 65535 )
1996
2029
2030
+ # TODO: RUSTPYTHON, observed gids do not match expected gids
2031
+ @unittest .expectedFailure
1997
2032
@unittest .skipUnless (hasattr (os , 'setregid' ), 'no setregid() on platform' )
1998
2033
def test_group (self ):
1999
2034
gid = os .getegid ()
@@ -2041,6 +2076,8 @@ def test_group_error(self):
2041
2076
with self .assertRaises (ValueError ):
2042
2077
subprocess .check_call (ZERO_RETURN_CMD , group = 65535 )
2043
2078
2079
+ # TODO: RUSTPYTHON, observed gids do not match expected gids
2080
+ @unittest .expectedFailure
2044
2081
@unittest .skipUnless (hasattr (os , 'setgroups' ), 'no setgroups() on platform' )
2045
2082
def test_extra_groups (self ):
2046
2083
gid = os .getegid ()
@@ -2095,6 +2132,8 @@ def test_extra_groups_error(self):
2095
2132
with self .assertRaises (ValueError ):
2096
2133
subprocess .check_call (ZERO_RETURN_CMD , extra_groups = [])
2097
2134
2135
+ # TODO: RUSTPYTHON
2136
+ @unittest .expectedFailure
2098
2137
@unittest .skipIf (mswindows or not hasattr (os , 'umask' ),
2099
2138
'POSIX umask() is not available.' )
2100
2139
def test_umask (self ):
@@ -2146,6 +2185,8 @@ def test_CalledProcessError_str_non_zero(self):
2146
2185
error_string = str (err )
2147
2186
self .assertIn ("non-zero exit status 2." , error_string )
2148
2187
2188
+ # TODO: RUSTPYTHON
2189
+ @unittest .expectedFailure
2149
2190
def test_preexec (self ):
2150
2191
# DISCLAIMER: Setting environment variables is *not* a good use
2151
2192
# of a preexec_fn. This is merely a test.
@@ -2157,6 +2198,8 @@ def test_preexec(self):
2157
2198
with p :
2158
2199
self .assertEqual (p .stdout .read (), b"apple" )
2159
2200
2201
+ # TODO: RUSTPYTHON
2202
+ @unittest .expectedFailure
2160
2203
def test_preexec_exception (self ):
2161
2204
def raise_it ():
2162
2205
raise ValueError ("What if two swallows carried a coconut?" )
@@ -2198,6 +2241,8 @@ def _execute_child(self, *args, **kwargs):
2198
2241
for fd in devzero_fds :
2199
2242
os .close (fd )
2200
2243
2244
+ # TODO: RUSTPYTHON
2245
+ @unittest .expectedFailure
2201
2246
@unittest .skipIf (not os .path .exists ("/dev/zero" ), "/dev/zero required." )
2202
2247
def test_preexec_errpipe_does_not_double_close_pipes (self ):
2203
2248
"""Issue16140: Don't double close pipes on preexec error."""
@@ -2212,6 +2257,8 @@ def raise_it():
2212
2257
stdin = subprocess .PIPE , stdout = subprocess .PIPE ,
2213
2258
stderr = subprocess .PIPE , preexec_fn = raise_it )
2214
2259
2260
+ # TODO: RUSTPYTHON
2261
+ @unittest .expectedFailure
2215
2262
def test_preexec_gc_module_failure (self ):
2216
2263
# This tests the code that disables garbage collection if the child
2217
2264
# process will execute any Python.
@@ -2233,6 +2280,8 @@ def test_preexec_gc_module_failure(self):
2233
2280
if not enabled :
2234
2281
gc .disable ()
2235
2282
2283
+ # TODO: RUSTPYTHON
2284
+ @unittest .expectedFailure
2236
2285
@unittest .skipIf (
2237
2286
sys .platform == 'darwin' , 'setrlimit() seems to fail on OS X' )
2238
2287
def test_preexec_fork_failure (self ):
@@ -2643,6 +2692,8 @@ def test_swap_std_fds_with_one_closed(self):
2643
2692
for to_fds in itertools .permutations (range (3 ), 2 ):
2644
2693
self ._check_swap_std_fds_with_one_closed (from_fds , to_fds )
2645
2694
2695
+ # TODO: RUSTPYTHON
2696
+ @unittest .expectedFailure
2646
2697
def test_surrogates_error_message (self ):
2647
2698
def prepare ():
2648
2699
raise ValueError ("surrogate:\uDCff " )
@@ -2662,6 +2713,8 @@ def prepare():
2662
2713
else :
2663
2714
self .fail ("Expected ValueError or subprocess.SubprocessError" )
2664
2715
2716
+ # TODO: RUSTPYTHON
2717
+ @unittest .expectedFailure
2665
2718
def test_undecodable_env (self ):
2666
2719
for key , value in (('test' , 'abc\uDCFF ' ), ('test\uDCFF ' , '42' )):
2667
2720
encoded_value = value .encode ("ascii" , "surrogateescape" )
@@ -2782,6 +2835,7 @@ def kill_p2():
2782
2835
p1 .stdout .close ()
2783
2836
p2 .stdout .close ()
2784
2837
2838
+ @unittest .skip ("TODO: RUSTPYTHON, flaky test" )
2785
2839
def test_close_fds (self ):
2786
2840
fd_status = support .findfile ("fd_status.py" , subdir = "subprocessdata" )
2787
2841
@@ -2909,6 +2963,7 @@ def test_close_fds_when_max_fd_is_lowered(self):
2909
2963
msg = "Some fds were left open." )
2910
2964
2911
2965
2966
+ @unittest .skip ("TODO: RUSTPYTHON, flaky test" )
2912
2967
# Mac OS X Tiger (10.4) has a kernel bug: sometimes, the file
2913
2968
# descriptor of a pipe closed in the parent process is valid in the
2914
2969
# child process according to fstat(), but the mode of the file
@@ -3116,6 +3171,8 @@ def test_leak_fast_process_del_killed(self):
3116
3171
else :
3117
3172
self .assertNotIn (ident , [id (o ) for o in subprocess ._active ])
3118
3173
3174
+ # TODO: RUSTPYTHON
3175
+ @unittest .expectedFailure
3119
3176
def test_close_fds_after_preexec (self ):
3120
3177
fd_status = support .findfile ("fd_status.py" , subdir = "subprocessdata" )
3121
3178
@@ -3418,6 +3475,8 @@ def test_close_fds(self):
3418
3475
close_fds = True )
3419
3476
self .assertEqual (rc , 47 )
3420
3477
3478
+ # TODO: RUSTPYTHON
3479
+ @unittest .expectedFailure
3421
3480
def test_close_fds_with_stdio (self ):
3422
3481
import msvcrt
3423
3482
@@ -3500,6 +3559,8 @@ def test_shell_string(self):
3500
3559
with p :
3501
3560
self .assertIn (b"physalis" , p .stdout .read ())
3502
3561
3562
+ # TODO: RUSTPYTHON
3563
+ @unittest .expectedFailure
3503
3564
def test_shell_encodings (self ):
3504
3565
# Run command through the shell (string)
3505
3566
for enc in ['ansi' , 'oem' ]:
@@ -3646,6 +3707,7 @@ def popen_via_context_manager(*args, **kwargs):
3646
3707
raise KeyboardInterrupt # Test how __exit__ handles ^C.
3647
3708
self ._test_keyboardinterrupt_no_kill (popen_via_context_manager )
3648
3709
3710
+ @unittest .expectedFailureIfWindows ("TODO: RUSTPYTHON" )
3649
3711
def test_getoutput (self ):
3650
3712
self .assertEqual (subprocess .getoutput ('echo xyzzy' ), 'xyzzy' )
3651
3713
self .assertEqual (subprocess .getstatusoutput ('echo xyzzy' ),
@@ -3718,20 +3780,28 @@ def with_spaces(self, *args, **kwargs):
3718
3780
"2 [%r, 'ab cd']" % self .fname
3719
3781
)
3720
3782
3783
+ # TODO: RUSTPYTHON
3784
+ @unittest .expectedFailure
3721
3785
def test_shell_string_with_spaces (self ):
3722
3786
# call() function with string argument with spaces on Windows
3723
3787
self .with_spaces ('"%s" "%s" "%s"' % (sys .executable , self .fname ,
3724
3788
"ab cd" ), shell = 1 )
3725
3789
3790
+ # TODO: RUSTPYTHON
3791
+ @unittest .expectedFailure
3726
3792
def test_shell_sequence_with_spaces (self ):
3727
3793
# call() function with sequence argument with spaces on Windows
3728
3794
self .with_spaces ([sys .executable , self .fname , "ab cd" ], shell = 1 )
3729
3795
3796
+ # TODO: RUSTPYTHON
3797
+ @unittest .expectedFailure
3730
3798
def test_noshell_string_with_spaces (self ):
3731
3799
# call() function with string argument with spaces on Windows
3732
3800
self .with_spaces ('"%s" "%s" "%s"' % (sys .executable , self .fname ,
3733
3801
"ab cd" ))
3734
3802
3803
+ # TODO: RUSTPYTHON
3804
+ @unittest .expectedFailure
3735
3805
def test_noshell_sequence_with_spaces (self ):
3736
3806
# call() function with sequence argument with spaces on Windows
3737
3807
self .with_spaces ([sys .executable , self .fname , "ab cd" ])
0 commit comments