mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
gh-109566: regrtest doesn't enable --rerun if --python is used (#109969)
regrtest: --fast-ci and --slow-ci options no longer enable --rerun if the --python option is used.
This commit is contained in:
parent
d9809e84fb
commit
62881a79a8
2 changed files with 12 additions and 3 deletions
|
@ -374,7 +374,7 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
self.checkError(['--unknown-option'],
|
||||
'unrecognized arguments: --unknown-option')
|
||||
|
||||
def check_ci_mode(self, args, use_resources):
|
||||
def check_ci_mode(self, args, use_resources, rerun=True):
|
||||
ns = cmdline._parse_args(args)
|
||||
if utils.MS_WINDOWS:
|
||||
self.assertTrue(ns.nowindows)
|
||||
|
@ -383,7 +383,7 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
# which has an unclear API
|
||||
regrtest = main.Regrtest(ns)
|
||||
self.assertEqual(regrtest.num_workers, -1)
|
||||
self.assertTrue(regrtest.want_rerun)
|
||||
self.assertEqual(regrtest.want_rerun, rerun)
|
||||
self.assertTrue(regrtest.randomize)
|
||||
self.assertIsNone(regrtest.random_seed)
|
||||
self.assertTrue(regrtest.fail_env_changed)
|
||||
|
@ -400,6 +400,14 @@ class ParseArgsTestCase(unittest.TestCase):
|
|||
regrtest = self.check_ci_mode(args, use_resources)
|
||||
self.assertEqual(regrtest.timeout, 10 * 60)
|
||||
|
||||
def test_fast_ci_python_cmd(self):
|
||||
args = ['--fast-ci', '--python', 'python -X dev']
|
||||
use_resources = sorted(cmdline.ALL_RESOURCES)
|
||||
use_resources.remove('cpu')
|
||||
regrtest = self.check_ci_mode(args, use_resources, rerun=False)
|
||||
self.assertEqual(regrtest.timeout, 10 * 60)
|
||||
self.assertEqual(regrtest.python_cmd, ('python', '-X', 'dev'))
|
||||
|
||||
def test_fast_ci_resource(self):
|
||||
# it should be possible to override resources
|
||||
args = ['--fast-ci', '-u', 'network']
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue