Ignoring site-packages when running zc.buildout tests

I have python-setuptools installed through my OS and zc.buildout installed with easy_install. I'd like to be able to ignore these when running the zc.buildout tests (or tests for other projects that handle distributions) so that the system packages don't interfere with the testing environment. Any ideas? Should the zc.buildout tests be modified or should my system? Ross

On Oct 30, 2007, at 6:34 PM, Ross Patterson wrote:
I have python-setuptools installed through my OS and zc.buildout installed with easy_install. I'd like to be able to ignore these when running the zc.buildout tests (or tests for other projects that handle distributions) so that the system packages don't interfere with the testing environment.
Any ideas?
Your test runner could arrange that site-packages is excluded from sys.path. I plan to add an option to the various egg-related recipes, including the test runner recipe, to exclude site-packages when looking for eggs.
Should the zc.buildout tests be modified or should my system?
Probably. Note that the zc.buildout tests only work when run from a zc.buildout checkout. I need to fix this. Also note that a number of the tests expect the name of the Python interpreter to be of the form: "pythonN.N". Some tests require Python 2.3 to be around so they can test support for multiple interpreters. In other words, the buildout tests are a bit of a pain to run, Jim -- Jim Fulton Zope Corporation

Jim Fulton <jim@zope.com> writes:
On Oct 30, 2007, at 6:34 PM, Ross Patterson wrote:
I have python-setuptools installed through my OS and zc.buildout installed with easy_install. I'd like to be able to ignore these when running the zc.buildout tests (or tests for other projects that handle distributions) so that the system packages don't interfere with the testing environment.
Any ideas?
Your test runner could arrange that site-packages is excluded from sys.path.
I plan to add an option to the various egg-related recipes, including the test runner recipe, to exclude site-packages when looking for eggs.
Well then I think I'll wait for such. Thanks.
Should the zc.buildout tests be modified or should my system?
Probably. Note that the zc.buildout tests only work when run from a zc.buildout checkout. I need to fix this.
FWIW, this is how I was running them and my system installed packages were still causing test failures, unless I'm misunderstanding things. Ross

On Oct 30, 2007, at 6:52 PM, Ross Patterson wrote:
Jim Fulton <jim@zope.com> writes:
On Oct 30, 2007, at 6:34 PM, Ross Patterson wrote:
Should the zc.buildout tests be modified or should my system?
Probably. Note that the zc.buildout tests only work when run from a zc.buildout checkout. I need to fix this.
FWIW, this is how I was running them and my system installed packages were still causing test failures, unless I'm misunderstanding things.
Sorry, I should have used 2 paragraphs. I was simply pointing out some issues with the tests, independent of the specific issue you raised. -- Jim Fulton Zope Corporation

Jim Fulton <jim@zope.com> writes:
On Oct 30, 2007, at 6:52 PM, Ross Patterson wrote:
Jim Fulton <jim@zope.com> writes:
On Oct 30, 2007, at 6:34 PM, Ross Patterson wrote:
Should the zc.buildout tests be modified or should my system?
Probably. Note that the zc.buildout tests only work when run from a zc.buildout checkout. I need to fix this.
FWIW, this is how I was running them and my system installed packages were still causing test failures, unless I'm misunderstanding things.
Sorry, I should have used 2 paragraphs. I was simply pointing out some issues with the tests, independent of the specific issue you raised.
Actually, that raises another questions I've been wanting to ask. Is there a good story for using a project buildout for running tests while still supporting "python setup.py test" for the same project? Is there documentation or a good example of this somewhere? On a somewhat related note, is there a paster script that does initial testing buildout layout for a new project? How about initial tests layout for a new project? Ross

On Oct 30, 2007, at 7:16 PM, Ross Patterson wrote:
Jim Fulton <jim@zope.com> writes:
On Oct 30, 2007, at 6:52 PM, Ross Patterson wrote:
Jim Fulton <jim@zope.com> writes:
On Oct 30, 2007, at 6:34 PM, Ross Patterson wrote:
Should the zc.buildout tests be modified or should my system?
Probably. Note that the zc.buildout tests only work when run from a zc.buildout checkout. I need to fix this.
FWIW, this is how I was running them and my system installed packages were still causing test failures, unless I'm misunderstanding things.
Sorry, I should have used 2 paragraphs. I was simply pointing out some issues with the tests, independent of the specific issue you raised.
Actually, that raises another questions I've been wanting to ask. Is there a good story for using a project buildout for running tests while still supporting "python setup.py test" for the same project?
No. The test command to setup is completely specific to that command. The meta data to support it isn't available to anything else. ...
On a somewhat related note, is there a paster script that does initial testing buildout layout for a new project? How about initial tests layout for a new project?
I can't say anything about paster. I don't use it. I'm not aware of anything. The common layout is so simple, that automating it isn't all that attractive to me. IMO, a template that gets copied around would be enough. I even created one, but I don't remember where I put it. :) Jim -- Jim Fulton Zope Corporation
participants (2)
-
Jim Fulton
-
Ross Patterson