[Zope3-dev] help with buddydemo tutorial

Reilly, Joseph M Joseph.Reilly at ca.com
Mon Sep 27 10:37:51 EDT 2004


Hi,
	Now that I have a functioning laptop I'm going through the
buddydemo tutorial. I'm stuck at the beginning trying to run the
unittests. Here is what I've done so far.

Installed Python23 in default location c:\python23
Installed ZopeX3-3.0.0c1 into c:\python23
Downloaded Zope3 head into c:\zope3
Created Zope 3 instance at c:\zope3BDM
Created a buddydemo like package call SDM at c:\zope3BDM\lib\python\SDM
Started up Zope and was able to add an instance in the UI.

However when I try and run the unit tests from 
C:\zope3BDM\lib\python
with this command
python \Python23\Lib\site-packages\zope\app\tests\test.py  -vds SDM
it fails with 

Running UNIT tests at level 1
Running UNIT tests from C:\zope3BDM\lib\python
No module named tests
['C:\\zope3BDM\\lib\\python\\src',
'C:\\Python23\\Lib\\site-packages\\zope\\app\
\tests', 'C:\\Program Files\\Plone 2\\Zope\\lib\\python',
'C:\\WINDOWS\\System32
\\python23.zip', 'C:\\Program Files\\Plone
2\\Python\\lib\\site-packages\\Python
win', 'C:\\Program Files\\Plone 2\\Python\\lib\\site-packages\\win32',
'C:\\Prog
ram Files\\Plone 2\\Python\\lib\\site-packages\\win32\\lib',
'C:\\Program Files\
\Plone 2\\Python\\lib\\site-packages', 'c:\\python23\\DLLs',
'c:\\python23\\lib'
, 'c:\\python23\\lib\\plat-win', 'c:\\python23\\lib\\lib-tk',
'c:\\python23', 'c
:\\python23\\lib\\site-packages']
Traceback (most recent call last):
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 1208,
in ?
    process_args()
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 1189,
in proce
ss_args
    bad = main(MODULE_FILTERS, TEST_FILTERS, LIBDIR)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 864,
in main
    numbad = runner(files, test_filter, DEBUG)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 777,
in runner

    s = get_suite(file, result)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 624,
in get_su
ite
    mod = package_import(modname)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 600,
in packag
e_import
    __import__(modname)
ImportError: No module named tests

I have the tests.py module in the SDM package, also have a empty
__init__.py and my class module, prs.py. 


I also tried copying buddydemo from \zope3\src\buddydemo so that both
SDM and buddydemo are subdirectories of C:\zope3BDM\lib\python. And
after adding a buddydemo-configure.zcml to
C:\zope3BDM\etc\package-includes the UI seems to work fine. But when I
try the unittests against buddydemo I get this error

C:\zope3BDM\lib\python>python
\Python23\Lib\site-packages\zope\app\tests\test.py
 -vds buddydemo
Running UNIT tests at level 1
Running UNIT tests from C:\zope3BDM\lib\python
No module named ydemo.tests
['C:\\zope3BDM\\lib\\python\\src',
'C:\\Python23\\Lib\\site-packages\\zope\\app\
\tests', 'C:\\Program Files\\Plone 2\\Zope\\lib\\python',
'C:\\WINDOWS\\System32
\\python23.zip', 'C:\\Program Files\\Plone
2\\Python\\lib\\site-packages\\Python
win', 'C:\\Program Files\\Plone 2\\Python\\lib\\site-packages\\win32',
'C:\\Prog
ram Files\\Plone 2\\Python\\lib\\site-packages\\win32\\lib',
'C:\\Program Files\
\Plone 2\\Python\\lib\\site-packages', 'c:\\python23\\DLLs',
'c:\\python23\\lib'
, 'c:\\python23\\lib\\plat-win', 'c:\\python23\\lib\\lib-tk',
'c:\\python23', 'c
:\\python23\\lib\\site-packages']
Traceback (most recent call last):
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 1208,
in ?
    process_args()
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 1189,
in proce
ss_args
    bad = main(MODULE_FILTERS, TEST_FILTERS, LIBDIR)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 864,
in main
    numbad = runner(files, test_filter, DEBUG)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 777,
in runner

    s = get_suite(file, result)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 624,
in get_su
ite
    mod = package_import(modname)
  File "\Python23\Lib\site-packages\zope\app\tests\test.py", line 600,
in packag
e_import
    __import__(modname)
ImportError: No module named ydemo.tests


I hope it's something obvious that someone can spot quickly. It wasn't
clear to me from the tutorial instructions where to exactly install the
demo packages and where to run the unittests from. 

Thanks in advance,

Joe Reilly



More information about the Zope3-dev mailing list