The unittests are best run on the operating system you will be using. By running magi_bootstrap.py, the magi software will be installed along with the tests and associated scripts. However, they can be run within the development directory as well.
Of the installed scripts, magi_tests.py will run the system unittests and module tests. You can skip tests with the arguments:
- –nobase to skip system tests
- –nomodule to skip module testse
Supplying the argument -h will provide the help description for the tests.
Before running the tests, it is advised that you stop the running magi_daemon process or some of the tests will fail.
If running in the development directory, make sure the PYTHONPATH environment variable is set to montage/backend so that eveverything is resolved correctly.
There are two paths that magi_tests will search for tests to run. The first is in the magi module itself: magi/tests/###*.py. Any files matching will be loaded and unittests run.
The second path is any modules magi/modules/*/test.py. This is where any module unittests are loaded from.