[reportlab-users] More 2.2 questions - package rearrangement

Dinu Gherman gherman at darwin.in-berlin.de
Mon Sep 1 12:36:41 EDT 2008


Robin Becker:


>> You might add:

>> test_suite = "tests",

>> to setup.py then, so the tests may be executed easily like this:

>> $ python setup.py test

> what actually gets executed when this happens? There is presumably

> some standard entry point, but looking in the 2.5 "Distributing

> Python Modules" stuff I can't see the word test anywhere in the index.


Sine I was also missing a "test" command for setuptools I'm faking
this kind of thing like this (in setup.py):

# test before building/installing

setupCommand = sys.argv[-1]
if setupCommand == "test":
print "running test suite"
cmd = "cd src; %s test_mygreatapp.py" % sys.executable
os.system(cmd)
sys.exit()

Dinu


More information about the reportlab-users mailing list