Re: [Zope3-Users] newbie problems with new content-type
[EMAIL PROTECTED] wrote: 'test' command searches only packages under instance_lib. and instance_lib is 'c:\path\to\your\instance\lib\python' Ok, that's my problem. My package was outside the instance lib directory. I think I have read in the Zope Developers Book that you could put your application anywhere in your harddisk as long as PYTHONPATH includes it. Now, the tests are found. Thanks a lot Katsutoshi Cheers Lorenzo ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] newbie problems with new content-type
Ok, that's my problem. My package was outside the instance lib directory. I think I have read in the Zope Developers Book that you could put your application anywhere in your harddisk as long as PYTHONPATH includes it. I understand that. a month ago I was in the same situation as you are now. I also couldn't a unit test to work. so I read the source code of 'test' command. As mentioned often before here, Stephan's book is somewhat outdated. You should be aware of that. regards Watanabe, Katsutoshi ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] newbie problems with new content-type
Chris Withers wrote: Lorenzo Gil Sanchez wrote: c:\path\to\my\instance\bin\test -vpu --dir z:\my_root_app_dir [ traceback ] ImportError: No module named z:.my_root_app_dir Is my_root_app_dir on your PYTHON_PATH? Yes it is also, do you have __init__.py files in \tests? Yes I do If you have, you should be able to do: c:\path\to\my\instance\bin\test -vpu tests c:\zope\development\bin\test -vpu tests Running tests at level 1 Total: 0 tests, 0 failures, 0 errors No tests are found :( Thanks anyway Lorenzo ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users
Re: [Zope3-Users] newbie problems with new content-type
Christoph Frick wrote: On Mon, Feb 06, 2006 at 06:48:30PM +0100, Lorenzo Gil Sanchez wrote: c:\path\to\my\instance\bin\test -vpu --dir z:\my_root_app_dir [ traceback ] ImportError: No module named z:.my_root_app_dir dunnonothing about windows - but either the test-environment can not handle the leading letter: or a relative path is expected. Yeah, that's what I though so I try executing it with relative paths as you can see from my second try (in the original message). ForbiddenAttribute: ('name', my_root_app_dir.provider.Provider object at 0x034A2730) addform label=Add Provider name=AddProvider.html schema=my_root_app_dir.interfaces.IProvider content_factory=my_root_app_dir.provider.Provider fields=name phone address email permission=zope.ManageContent / is it possible you forgot to provide permissions for setting the schema? content class=.provider.Provider implements interface=zope.app.annotation.IAttributeAnnotatable / require permission=zope.View interface=.interface.IProvider / require permission=zope.ManageContent set_schema=.interfaces.IProvider / /content where interface.IProvider should have an attribute ``name''. Thanks a lot Christoph. That was exactly my problem. It's great to have so fast feedback. Lorenzo ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users ___ Zope3-users mailing list Zope3-users@zope.org http://mail.zope.org/mailman/listinfo/zope3-users