msg145768 - (view) |
Author: David Barnett (mu_mind) |
Date: 2011-10-18 01:53 |
The setup.py file currently generated by "pysetup generate-setup" fails to import the "codecs" module, and also uses a split_multiline function from distutils2/utils.py that's undefined in the setup script. |
|
|
msg145833 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-18 16:19 |
Thanks! I haven’t tested generate-setup for some time. It would be great to add a regression test for this. Would you like to do it? To mock user input, just copy the Inputs class from test_command_register. If not, I will do it. |
|
|
msg145837 - (view) |
Author: David Barnett (mu_mind) |
Date: 2011-10-18 16:26 |
Sure, I can give it a go. I'll probably have a chance sometime today. |
|
|
msg145886 - (view) |
Author: David Barnett (mu_mind) |
Date: 2011-10-19 05:35 |
Regression tests. Not positive that subprocess is the best approach for running these, but it seems to work. In the process of writing tests, I discovered another missing import for PackagingFileError when there's no setup.cfg. |
|
|
msg145926 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-19 17:54 |
Excellent, thanks! I’ll move the tests into the existing test_run.py file. |
|
|
msg146083 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2011-10-21 13:52 |
New changeset 21c33aa2178b by Éric Araujo in branch 'default': Fix missing imports in setup scripts generated by packaging (#13205). http://hg.python.org/cpython/rev/21c33aa2178b |
|
|
msg146086 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2011-10-21 13:58 |
New changeset 5949563b9f1c by Éric Araujo in branch 'default': Fix missing imports in generated setup scripts (#13205). http://hg.python.org/distutils2/rev/5949563b9f1c New changeset eb845a9a00b7 by Éric Araujo in branch 'python3': Merge fix for #13205 and other changes from default. http://hg.python.org/distutils2/rev/eb845a9a00b7 |
|
|
msg146087 - (view) |
Author: Éric Araujo (eric.araujo) *  |
Date: 2011-10-21 14:01 |
As you can see in my commit, I made more changes to the code and simplified the tests. subprocess is definitely the way to test script functionality, it’s much cleaner than monkey-patching sys.argv; we even have higher-level helpers to do that in test.script_helper. (BTW, the comment I made about mocking user input in my first reply makes no sense: I was confusing pysetup create and pysetup generate-setup :) I also mistakenly talked about test_run when the correct file was test_util.) |
|
|