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

This commit is contained in:
Victor Stinner 2024-06-03 18:34:36 +02:00 committed by GitHub
parent 1d4c2e4a87
commit 4e8aa32245
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 46 additions and 12 deletions

View file

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