[3.13] gh-119727: Add --single-process option to regrtest (#119728) (#123010)

gh-119727: Add --single-process option to regrtest (#119728)

(cherry picked from commit 4e8aa32245)

Co-authored-by: Victor Stinner <vstinner@python.org>
This commit is contained in:
Malcolm Smith 2024-08-26 10:59:26 +01:00 committed by GitHub
parent 3822d7cd28
commit 350313e731
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 43 additions and 9 deletions

View file

@ -475,6 +475,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: