@@ -139,16 +139,17 @@ def test_seq_bytes_to_charp_array(self):
139139 class Z (object ):
140140 def __len__ (self ):
141141 return 1
142- self .assertRaises (TypeError , _posixsubprocess .fork_exec ,
143- 1 ,Z (),3 ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 )
142+ with self .assertRaisesRegex (TypeError , 'indexing' ):
143+ _posixsubprocess .fork_exec (
144+ 1 ,Z (),True ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,True ,True ,17 ,False ,19 ,20 ,21 ,22 ,False )
144145 # Issue #15736: overflow in _PySequence_BytesToCharpArray()
145146 class Z (object ):
146147 def __len__ (self ):
147148 return sys .maxsize
148149 def __getitem__ (self , i ):
149150 return b'x'
150151 self .assertRaises (MemoryError , _posixsubprocess .fork_exec ,
151- 1 ,Z (),3 ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 , 16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 )
152+ 1 ,Z (),True ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,True , True ,17 ,False ,19 ,20 ,21 ,22 ,False )
152153
153154 @unittest .skipUnless (_posixsubprocess , '_posixsubprocess required for this test.' )
154155 def test_subprocess_fork_exec (self ):
@@ -158,7 +159,7 @@ def __len__(self):
158159
159160 # Issue #15738: crash in subprocess_fork_exec()
160161 self .assertRaises (TypeError , _posixsubprocess .fork_exec ,
161- Z (),[b'1' ],3 ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 , 16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 )
162+ Z (),[b'1' ],True ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,True , True ,17 ,False ,19 ,20 ,21 ,22 ,False )
162163
163164 @unittest .skipIf (MISSING_C_DOCSTRINGS ,
164165 "Signature information for builtins requires docstrings" )
0 commit comments