[Zope3-Users] newbie problems with new content-type

wata at kke.biglobe.ne.jp wata at kke.biglobe.ne.jp
Wed Feb 8 20:12:06 EST 2006


> 
> c:\path\to\my\instance\bin\test -vpu --dir z:\my_root_app_dir
> [ traceback ]
> ImportError: No module named z:.my_root_app_dir
> 
> So I go to the z:\ dir and try another form:
> 
> c:\path\to\my\instance\bin\test -vpu --dir my_root_app_dir
> Running tests at level 1
> Total: 0 tests, 0 failures, 0 errors
> 

if 'z:\my_root_app_dir' is included in PYTHON_PATH, you don't
have to specify it in your 'test' command.

'test' command searches only packages under "instance_lib".
and "instance_lib" is 'c:\path\to\your\instance\lib\python'

Let's say your package is at:

   'c:\path\to\your\instance\lib\python\your\package'

so, in python code, you can import something from this package like:

    from your.package import something

when you'd like to run the unit test of the package, 
the command will be like:

    c:\path\to\your\instance\bin\test -vpu --dir=your\package
                                or
    c:\path\to\your\instance\bin\test -vpu --dir=your.package
                                or
    c:\path\to\your\instance\bin\test -vpu --package=your\package
                                or
    c:\path\to\your\instance\bin\test -vpu --package=your.package


the argument of '--dir' option has to be a package name, 
it's not a directory path. I think it's confusing.

I think the latest one is most straightforward.

regards

----
Watanabe, Katsutoshi



More information about the Zope3-users mailing list