mirror of
https://github.com/python/cpython.git
synced 2025-12-08 06:10:17 +00:00
gh-135494: Fix python -m test --pgo -x test_re (#135713)
Fix regrtest to support excluding tests from --pgo tests.
(cherry picked from commit 15c6d63fe6)
This commit is contained in:
parent
028d56fd78
commit
a27398d5b3
3 changed files with 23 additions and 6 deletions
|
|
@ -2346,6 +2346,17 @@ def check(output):
|
|||
output = self.run_tests('-j1', '-v', testname, env=env, isolated=False)
|
||||
check(output)
|
||||
|
||||
def test_pgo_exclude(self):
|
||||
# Get PGO tests
|
||||
output = self.run_tests('--pgo', '--list-tests')
|
||||
pgo_tests = output.strip().split()
|
||||
|
||||
# Exclude test_re
|
||||
output = self.run_tests('--pgo', '--list-tests', '-x', 'test_re')
|
||||
tests = output.strip().split()
|
||||
self.assertNotIn('test_re', tests)
|
||||
self.assertEqual(len(tests), len(pgo_tests) - 1)
|
||||
|
||||
|
||||
class TestUtils(unittest.TestCase):
|
||||
def test_format_duration(self):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue