On Thu, 8 Dec 2005, Todd Greenwood-Geer wrote: [...]
the setup.py for the given egg. So the question is, given that my friend/client is receiving eggs, how can they perform the equivalent of '$python setup.py test'? Currently, I have suggested that they unzip the egg and run the unittests dirctly from the unzipped files...something like this:
- unzip foo.egg
- cd foo
- python src/foo/unittest.py
1. To avoid confusion, rename your module unittest so as not to have the same name as Python stdlib module unittest (don't call it 'test' either, for the same reason -- module test contains *Python's* unittests; personally I find it unfortunate that standard Python comes with a module named 'test', but there it is). Let's say you call it 'tests'.
2. Make module tests importable from your own package, so one can do:
from mypkg import tests
3. Use setuptools to provide a script that imports and runs module tests direct from the egg.