classification
Title: Tools/parser/unparse.py is out of date.
Type: behavior Stage: patch review
Components: Demos and Tools Versions: Python 3.2, Python 3.3
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: mark.dickinson Nosy List: mark.dickinson, python-dev, r.david.murray
Priority: normal Keywords: patch

Created on 2012-04-29 19:44 by mark.dickinson, last changed 2012-05-07 10:08 by mark.dickinson. This issue is now closed.

Files
File name Uploaded Description Edit
unparse.patch mark.dickinson, 2012-04-29 19:44 review
test_unparse_in_test_tools.patch mark.dickinson, 2012-05-06 17:10 review
Messages (8)
msg159645 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-04-29 19:44
Here's a patch that makes all tests in Tools/parser/test_unparse.py pass on the default branch.  (The 'yield from' bits would have to be removed for 3.2.)
msg159976 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-05-05 01:41
There is a test_tools file now.  test_unparse could be called from it.
msg160095 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-05-06 16:36
Ah, that's good to know.  I think I'll commit the fix and then look into hooking test_unparse into test_tools.

For 3.2, it turns out that all that's missing is support for Starred.
msg160096 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-05-06 16:38
Committed in revision c80576303892 (3.2), revision 89e928048903 (default).  (I put 14965 instead of 14695 in the commit messages by mistake.)
msg160097 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-05-06 17:10
David:  Any suggestions for how best to integrate test_unparse.py into test_tools?

We could move the contents of test_unparse.py directly in test_tools.py and just kill the old test_unparse.py.

Alternatively, we could import those TestCase subclasses from test_unparse;  is there a better way of doing this than temporarily hacking sys.path to add the Tools/parser directory, as in the attached patch?
msg160100 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2012-05-06 17:39
Since we are already doing path hackery in that test file to get things to run, I think your patch would be fine.

If we grow more tests for the stuff in Tools (which would be good), we might want to consider reorganizing things, but for now I think that the simplest thing that works is good.
msg160123 - (view) Author: Roundup Robot (python-dev) Date: 2012-05-07 09:27
New changeset f9344a3eaaa6 by Mark Dickinson in branch 'default':
Issue #14695: Run Tools/parser/test_unparse.py as part of test_tools.
http://hg.python.org/cpython/rev/f9344a3eaaa6
msg160124 - (view) Author: Mark Dickinson (mark.dickinson) * (Python committer) Date: 2012-05-07 09:27
Thanks, David!
History
Date User Action Args
2012-05-07 10:08:23mark.dickinsonsetassignee: mark.dickinson
2012-05-07 09:27:57mark.dickinsonsetstatus: open -> closed
resolution: fixed
messages: + msg160124
2012-05-07 09:27:31python-devsetnosy: + python-dev
messages: + msg160123
2012-05-06 17:39:07r.david.murraysetmessages: + msg160100
2012-05-06 17:10:05mark.dickinsonsetfiles: + test_unparse_in_test_tools.patch

messages: + msg160097
2012-05-06 16:38:33mark.dickinsonsetmessages: + msg160096
2012-05-06 16:36:04mark.dickinsonsetmessages: + msg160095
2012-05-05 01:41:04r.david.murraysetnosy: + r.david.murray
messages: + msg159976
2012-04-29 19:44:33mark.dickinsoncreate