[3.12] gh-119727: Add --single-process option to regrtest (GH-119728) (#130359)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Hugo van Kemenade 2025-02-20 17:47:10 +02:00 committed by GitHub
parent 60410f3c76
commit ecfca20719
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 9 deletions

View file

@ -466,6 +466,19 @@ class ParseArgsTestCase(unittest.TestCase):
self.assertEqual(regrtest.hunt_refleak.runs, 10)
self.assertFalse(regrtest.output_on_failure)
def test_single_process(self):
args = ['-j2', '--single-process']
with support.captured_stderr():
regrtest = self.create_regrtest(args)
self.assertEqual(regrtest.num_workers, 0)
self.assertTrue(regrtest.single_process)
args = ['--fast-ci', '--single-process']
with support.captured_stderr():
regrtest = self.create_regrtest(args)
self.assertEqual(regrtest.num_workers, 0)
self.assertTrue(regrtest.single_process)
@dataclasses.dataclass(slots=True)
class Rerun: