@@ -138,16 +138,17 @@ def test_seq_bytes_to_charp_array(self):
138138 class Z (object ):
139139 def __len__ (self ):
140140 return 1
141- self .assertRaises (TypeError , _posixsubprocess .fork_exec ,
142- 1 ,Z (),3 ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 ,16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 )
141+ with self .assertRaisesRegex (TypeError , 'indexing' ):
142+ _posixsubprocess .fork_exec (
143+ 1 ,Z (),True ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,True ,True ,17 ,False ,19 ,20 ,21 ,22 ,False )
143144 # Issue #15736: overflow in _PySequence_BytesToCharpArray()
144145 class Z (object ):
145146 def __len__ (self ):
146147 return sys .maxsize
147148 def __getitem__ (self , i ):
148149 return b'x'
149150 self .assertRaises (MemoryError , _posixsubprocess .fork_exec ,
150- 1 ,Z (),3 ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,15 , 16 ,17 ,18 ,19 ,20 ,21 ,22 ,23 )
151+ 1 ,Z (),True ,(1 , 2 ),5 ,6 ,7 ,8 ,9 ,10 ,11 ,12 ,13 ,14 ,True , True ,17 ,False ,19 ,20 ,21 ,22 ,False )
151152
152153 @unittest .skipUnless (_posixsubprocess , '_posixsubprocess required for this test.' )
153154 def test_subprocess_fork_exec (self ):
@@ -157,7 +158,7 @@ def __len__(self):
157158
158159 # Issue #15738: crash in subprocess_fork_exec()
159160 self .assertRaises (TypeError , _posixsubprocess .fork_exec ,
160- 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 )
161+ 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 )
161162
162163 @unittest .skipIf (MISSING_C_DOCSTRINGS ,
163164 "Signature information for builtins requires docstrings" )
0 commit comments