Re: [Zope3-dev] test.py renamed
On Sunday 09 October 2005 11:07, Jim Fulton wrote: > > That changes a bit the way tests are to be called. > > This is a fairly significant change to make without a proposal. Right. > I would expect that there are a number of documentation resources > that would need to change as well. Darn, I did not think about that. > A better change would be to arrange for the root directory to be excluded > from the Python path. In general, any script we use should, by default, > exclude its directory from sys.path. Yep. Regards, Stephan -- Stephan Richter CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student) Web2k - Web Software Design, Development and Training ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] test.py renamed
Martijn Faassen wrote: Jim Fulton wrote: A better change would be to arrange for the root directory to be excluded from the Python path. In general, any script we use should, by default, exclude its directory from sys.path. Maybe this only turns up if you have a package layout where the __init__.py is in the same place as the test runner? No. In fact, in this case, the problem had nothing to do with relative package imports and everything to do with the fact that there were 2 top-level "test" modules/packages on the Python path, Zope's test runner, and Python's test package. This only occurs because, by default, when Python runs a script, it adds the directory including the script to the Python path. That policy is often convenient, but it isn't convenient for Zope. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] test.py renamed
Jim Fulton wrote: A better change would be to arrange for the root directory to be excluded from the Python path. In general, any script we use should, by default, exclude its directory from sys.path. Maybe this only turns up if you have a package layout where the __init__.py is in the same place as the test runner? See also my recent blog posting, which talks about related matters: http://faassen.n--tree.net/blog/view/weblog/2005/10/07/0 Groeten, Martijn ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] test.py renamed
Jim Fulton wrote: Tarek Ziadé wrote: I have renamed 'test.py' in the trunk to 'testrunner.y' to avoid name collision, i.e. to be able to import python test module. This is a fairly significant change to make without a proposal. It is indeed. This should be reverted until more discussion and consideration can be done. -- Benji York Senior Software Engineer Zope Corporation ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com
Re: [Zope3-dev] test.py renamed
Tarek Ziadé wrote: Hi, FYI, Until Python let us do relative/absolute imports (the future statement), I have renamed 'test.py' in the trunk to 'testrunner.y' to avoid name collision, i.e. to be able to import python test module. > That changes a bit the way tests are to be called. This is a fairly significant change to make without a proposal. I would expect that there are a number of documentation resources that would need to change as well. A better change would be to arrange for the root directory to be excluded from the Python path. In general, any script we use should, by default, exclude its directory from sys.path. Jim -- Jim Fulton mailto:[EMAIL PROTECTED] Python Powered! CTO (540) 361-1714http://www.python.org Zope Corporation http://www.zope.com http://www.zope.org ___ Zope3-dev mailing list Zope3-dev@zope.org Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com