[Distutils] setup.py test confusion

Matt Patterson matt-lists at reprocessed.org
Thu Feb 23 19:11:40 CET 2006


I'm a bit confused about how the setuptools test runner is supposed  
to work.

My usual distutils packaging practice would be to be to a directory  
structure something like this:

/project/setup.py
/project/py/__init__.py
/project/py/module.py
/project/py/child_package/__init__.py
/project/py/child_package/module.py
where all the actual code lives in /project/py/

in setup.py I'd normally have something like this:

package_dir = {'package_name': 'py'}
packages = ['package_name', 'package_name.child_package']

I want to put my tests in /project/tests/, but I can't seem to make  
it work. When I run setup.py test with test_suite =  
'tests.test_suite' I get an ImportError. I'm new to setuptools in  
general, but I did figure out that my /project/py/module.py layout  
doesn't seem to work properly: find_packages() had problems, and I  
ended up shunting things around so it looked like /py/package_name/ 
module.py.

Any pointers?

Thanks,

Matt

-- 
   Matt Patterson | Design & Code
   <matt at emdash co uk> | http://www.emdash.co.uk/
   <matt at reprocessed org> | http://www.reprocessed.org/




-- 
   Matt Patterson | Design & Code
   <matt at emdash co uk> | http://www.emdash.co.uk/
   <matt at reprocessed org> | http://www.reprocessed.org/



More information about the Distutils-SIG mailing list