STINNER Victor added the comment:

regrtest_class.patch: Convert the long and complex main() function into a new 
Regrtest class using attributes and methods.

* Convert main() variables to Regrtest attributes: see the __init__() method. I 
documented some attributes

* Convert accumulate_result() function to a method

* Create setup_python() and setup_regrtest() methods. Maybe both methods should 
be merged, but for the first change I preferred to keep almost the same 
instruction order (not move code too much).

* Import gc at top level: the --threshold command line option is now ignored if 
the gc module is missing.

* Move resource.setrlimit() and the code to make the module paths absolute into 
the new setup_python() method. So this code is no more executed when the module 
is imported, only when main() is executed. We have a better on when the setup 
is done.

* Move textwrap import from printlist() to the top level.

* Some other minor cleanup.

----------
Added file: http://bugs.python.org/file40611/regrtest_class.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25220>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to