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


Attachment: signature.asc
Description: OpenPGP digital signature

_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

Open Source Applications Foundation "Dev" mailing list
http://lists.osafoundation.org/mailman/listinfo/dev

Reply via email to