• Victor Stinner's avatar
    Issue #25220: Split the huge main() function of libregrtest.main into a class · dad20e48
    Victor Stinner yazdı
    with attributes and methods.
    
    The --threshold command line option is now ignored if the gc module is missing.
    
    * Convert main() variables to Regrtest attributes, document some attributes
    * Convert accumulate_result() function to a method
    * Create setup_python() function and setup_regrtest() method.
    * Import gc at top level
    * Move resource.setrlimit() and the code to make the module paths absolute into
      the new setup_python() function. So this code is no more executed when the
      module is imported, only when main() is executed. We have a better control on
      when the setup is done.
    * Move textwrap import from printlist() to the top level.
    * Some other minor cleanup.
    dad20e48
main.py 22.4 KB