]> granicus.if.org Git - python/commit
Issue #25220: Split the huge main() function of libregrtest.main into a class
authorVictor Stinner <victor.stinner@gmail.com>
Tue, 29 Sep 2015 20:48:52 +0000 (22:48 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Tue, 29 Sep 2015 20:48:52 +0000 (22:48 +0200)
commitdad20e4876b339a559d61810299f96712719687e
treed5e5ff211f2ba7712e7057263e35f27f1a21c9ee
parentb27232949df2c7201f16e23bbfd6dd872f3bdc6d
Issue #25220: Split the huge main() function of libregrtest.main into a class
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.
Lib/test/libregrtest/main.py