[Dev] When to run unit tests and how
Heikki Toivonen
heikki at osafoundation.org
Tue Jun 7 20:03:46 PDT 2005
You should run unit tests before every checkin.
There are currently two ways to run unit tests. One method, or even
both, may not work for everyone - these issues should be filed as bugs.
The old method which still works is to use Hardhat. Tinderbox is
currently running the unit tests with Hardhat. Here's how:
1. Check out the hardhat directory, which is a sibling of chandler directory
2. cd chandler
3. ../hardhat/hardhat.py -t
or if you are running the debug bits the 3rd step is:
3. ../hardhat/hardhat.py -dt
That will run all of the unit tests.
To run all tests in some subdirectory, for example parcels:
cd chandler/parcels
../../hardhat/hardhat.py -t
(remember -d if running debug)
You can also pass the path to a single unit test as the only argument to
hardhat.py to run just that test (if running debug, you must also add -d
option)
The new method is to use run_tests.py which was created by pje:
cd chandler
./release/RunPython run_tests.py
This will tell you how to use run_tests.py. But for completeness sake,
here's how to run all unit tests:
./release/RunPython -m run_tests application crypto osaf repository
I was unable to run application tests just now, though.
INVALID_EMAIL_ADDRESS = _("%s Address %s is not a valid Email Address")
NameError: name '_' is not defined
Need to import gettext?
--
Heikki Toivonen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 249 bytes
Desc: OpenPGP digital signature
Url : http://lists.osafoundation.org/pipermail/dev/attachments/20050607/215f1e30/signature.pgp
More information about the Dev
mailing list