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.

classification
Title: Lib/test/__main__.py should share code with regrtest.py
Type: enhancement Stage: resolved
Components: Tests Versions: Python 3.4
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: chris.jerdonek, ezio.melotti, gmwils, michael.foord, petri.lehtinen, pitrou, python-dev
Priority: normal Keywords: easy, patch

Created on 2013-02-24 05:57 by chris.jerdonek, last changed 2022-04-11 14:57 by admin. This issue is now closed.

Files
File name Uploaded Description Edit
issue-17283-1.patch chris.jerdonek, 2013-02-25 01:09 review
issue-17283-2.patch chris.jerdonek, 2013-02-25 04:15 review
Messages (6)
msg182854 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2013-02-24 05:57
As discussed here:

http://bugs.python.org/issue15305#msg182853

this issue is for Lib/test/__main__.py to share code with Lib/test/regrtest.py to minimize duplication of code:

http://hg.python.org/cpython/file/96f08a22f562/Lib/test/regrtest.py#l1594
http://hg.python.org/cpython/file/96f08a22f562/Lib/test/__main__.py#l12
msg182909 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2013-02-25 01:09
Attaching patch.

The use of "global TEMPDIR" isn't ideal.  Alternatively, TEMPDIR's value when sysconfig.is_python_build() is true can be set when initially setting TEMPDIR:

http://hg.python.org/cpython/file/96f08a22f562/Lib/test/regrtest.py#l203
msg182915 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2013-02-25 04:15
Here is a new patch which does not use the global keyword.
msg183069 - (view) Author: Petri Lehtinen (petri.lehtinen) * (Python committer) Date: 2013-02-26 19:16
LGTM.
msg183161 - (view) Author: Roundup Robot (python-dev) (Python triager) Date: 2013-02-27 17:06
New changeset e0f3dcd30af8 by Chris Jerdonek in branch 'default':
Issue #17283: Share code between __main__.py and regrtest.py in Lib/test.
http://hg.python.org/cpython/rev/e0f3dcd30af8
msg183162 - (view) Author: Chris Jerdonek (chris.jerdonek) * (Python committer) Date: 2013-02-27 17:08
Thanks a lot for the review, Petri.
History
Date User Action Args
2022-04-11 14:57:42adminsetgithub: 61485
2013-02-27 17:08:02chris.jerdoneksetstatus: open -> closed
resolution: fixed
messages: + msg183162

stage: patch review -> resolved
2013-02-27 17:06:32python-devsetnosy: + python-dev
messages: + msg183161
2013-02-26 19:16:31petri.lehtinensetmessages: + msg183069
2013-02-25 04:15:41chris.jerdoneksetfiles: + issue-17283-2.patch

messages: + msg182915
2013-02-25 01:09:52chris.jerdoneksetstage: needs patch -> patch review
2013-02-25 01:09:46chris.jerdoneksetfiles: + issue-17283-1.patch
keywords: + patch
messages: + msg182909
2013-02-24 05:57:28chris.jerdonekcreate