(root)/
Python-3.11.7/
Lib/
test/
libregrtest/
pgo.py
       1  # Set of tests run by default if --pgo is specified.  The tests below were
       2  # chosen based on the following criteria: either they exercise a commonly used
       3  # C extension module or type, or they run some relatively typical Python code.
       4  # Long running tests should be avoided because the PGO instrumented executable
       5  # runs slowly.
       6  PGO_TESTS = [
       7      'test_array',
       8      'test_base64',
       9      'test_binascii',
      10      'test_binop',
      11      'test_bisect',
      12      'test_bytes',
      13      'test_bz2',
      14      'test_cmath',
      15      'test_codecs',
      16      'test_collections',
      17      'test_complex',
      18      'test_dataclasses',
      19      'test_datetime',
      20      'test_decimal',
      21      'test_difflib',
      22      'test_embed',
      23      'test_float',
      24      'test_fstring',
      25      'test_functools',
      26      'test_generators',
      27      'test_hashlib',
      28      'test_heapq',
      29      'test_int',
      30      'test_itertools',
      31      'test_json',
      32      'test_long',
      33      'test_lzma',
      34      'test_math',
      35      'test_memoryview',
      36      'test_operator',
      37      'test_ordered_dict',
      38      'test_patma',
      39      'test_pickle',
      40      'test_pprint',
      41      'test_re',
      42      'test_set',
      43      'test_sqlite3',
      44      'test_statistics',
      45      'test_struct',
      46      'test_tabnanny',
      47      'test_time',
      48      'test_unicode',
      49      'test_xml_etree',
      50      'test_xml_etree_c',
      51  ]
      52  
      53  def setup_pgo_tests(cmdline_args, pgo_extended: bool):
      54      if not cmdline_args and not pgo_extended:
      55          # run default set of tests for PGO training
      56          cmdline_args[:] = PGO_TESTS[:]