gh-60203: Always pass True/False as boolean arguments in tests (GH-99… · python/cpython@76f43fc
@@ -138,16 +138,17 @@ def test_seq_bytes_to_charp_array(self):
138138class Z(object):
139139def __len__(self):
140140return 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()
144145class Z(object):
145146def __len__(self):
146147return sys.maxsize
147148def __getitem__(self, i):
148149return b'x'
149150self.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)
151152152153@unittest.skipUnless(_posixsubprocess, '_posixsubprocess required for this test.')
153154def test_subprocess_fork_exec(self):
@@ -157,7 +158,7 @@ def __len__(self):
157158158159# Issue #15738: crash in subprocess_fork_exec()
159160self.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)
161162162163@unittest.skipIf(MISSING_C_DOCSTRINGS,
163164 "Signature information for builtins requires docstrings")