On 12/10/09 05:24, Lennart Regebro wrote:
2009/10/11 Michael Whapples<[email protected]>:
[...]
). Also anyway what would the reason be for a user to run tests on the
binary module, I (or another developer in the cases of modified versions)
should have run the tests before distributing the binary package.
Yes, but if something breaks it can be good to run the tests locally
to see if something in the environments breaks them. Also tests can be
useful as a sort of documentation.
In that case I would ask them to download the source distribution and run the
tests there, they probably will want the source distribution as I may need to
ask them to apply a patch and test it out (they have the environment I didn't
foresee/have).
I question how unit tests in a binary package are like a sort of
documentation as the user will not be able to see the test source code
as it will all be in .pyc files. Doctests are a different matter, but I
am on about unit tests.
OK, to possible solutions:
1. Distribute offers the keyword argument "convert_2to3_doctests", may be it
could have one to give test directory, and then .py files in that could be
converted.
Well, the test directory is test/test*.py.
2. As setuptools automatically includes test/test*.py, why can't distribute
actually compile these files as well (I question whether tests in a test
directory should be prefixed with test, but I don't have a really strong
view should people disagree).
The problem is that these files doesn't end up in the binary
distribution and hence 2to3 can't be run on them.
Bad wording on my part, I said compile when I meant convert, so point two should be
"As distribute will include test/test*.py, why can't distribute run 2to3 on these
files and so convert my tests and so then be able to run tests from the test
command". This probably would need distribute to create a separate directory (eg.
test_3k) and then run tests from the new location to achieve this.
Michael Whapples
_______________________________________________
Distutils-SIG maillist - [email protected]
http://mail.python.org/mailman/listinfo/distutils-sig