summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_regrtest.py
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@python.org>2024-06-03 16:34:36 (GMT)
committerGitHub <noreply@github.com>2024-06-03 16:34:36 (GMT)
commit4e8aa32245e2d72bf558b711ccdbcee594347615 (patch)
tree1b68abdc6ad2a62445b54525290fbf3002c5b9e2 /Lib/test/test_regrtest.py
parent1d4c2e4a877a48cdc8bcc9808d799b91c82b3757 (diff)
downloadcpython-4e8aa32245e2d72bf558b711ccdbcee594347615.zip
cpython-4e8aa32245e2d72bf558b711ccdbcee594347615.tar.gz
cpython-4e8aa32245e2d72bf558b711ccdbcee594347615.tar.bz2
gh-119727: Add --single-process option to regrtest (#119728)
Diffstat (limited to 'Lib/test/test_regrtest.py')
-rw-r--r--Lib/test/test_regrtest.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py
index 17eff61..97ce797 100644
--- a/Lib/test/test_regrtest.py
+++ b/Lib/test/test_regrtest.py
@@ -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: