This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients berker.peksag, ezio.melotti, jkloth, martin.panter, python-dev, r.david.murray, serhiy.storchaka, vstinner
Date 2015-09-23.21:26:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1443043596.98.0.0360104168032.issue25220@psf.upfronthosting.co.za>
In-reply-to
Content
I pushed the changeset eaf9a99b6bb8, but R. David Murray asked me to wait for a review before pushing changes. So I reverted my change.

I checked if Lib/test/regrtest.py is called directly. The answer is yes: it's called inside Python in various places, but also in scripts to build Python packages. Even if "python -m test" works (and "python -m test.regrtest" works on all Python versions), I prefer to keep Lib/test/regrest.py to not force users to have to modify their script.

So I propose to simply move regrtest.py code to smaller files in Lib/test/libregrtest/, as I did in attached regrtest_package.patch.

In the changeset eaf9a99b6bb8, I started with cmdline.py because it's the only part of regrtest.py which has real unit tests. I created Lib/test/libregrtest/cmdline.py with "hg cp" to keep Mercurial history. I checked which moved symbols are used: _parse_args() and RESOURCE_NAMES. I exported them in test.libregrtest. I had to modify Lib/test/test_regrtest.py.

For next changes, I will try to add a few new unit tests to Lib/test/test_regrtest.py.

--

Berker wrote: "I like the new features, but I think we should take a look at issue 10967 before converting it to a package or refactoring it."

IMHO it will be easier to enhance regrtest to reuse unit test features, make the code smaller, fix bugs, etc. if regrtest.py is splitted into smaller files. Moving code to a new test.libregrtest submodule should help to implement the issue #10967 & friends (ex: #16748)
History
Date User Action Args
2015-09-23 21:26:37vstinnersetrecipients: + vstinner, jkloth, ezio.melotti, r.david.murray, python-dev, berker.peksag, martin.panter, serhiy.storchaka
2015-09-23 21:26:36vstinnersetmessageid: <1443043596.98.0.0360104168032.issue25220@psf.upfronthosting.co.za>
2015-09-23 21:26:36vstinnerlinkissue25220 messages
2015-09-23 21:26:36vstinnercreate