lmtest.base package
Submodules
lmtest.base.controller module
Module containing test controller class.
- class lmtest.base.controller.Controller(pidfile, log=None)[source]
Bases:
lmtest.base.daemon.Daemon
Test controller.
- add_tests(new_tests)[source]
Add a new test object to run.
- Parameters
new_tests (list of LmTest) – A list of test objects to run.
- report_interval = 86400
- rest(sleep_seconds=10)[source]
Sleep before trying to run the next test.
- Note: This is abstracted just a bit in case we want to sleep for
“smart” intervals, such as until the next test is scheduled to run.
- Parameters
sleep_seconds (int, optional) – The number of seconds to sleep.
- run_test(test_to_run)[source]
Run a test and process the result.
- Parameters
test_to_run (LmTest) – The test that should be run.
lmtest.base.daemon module
This module contains a base-Daemon class.
- class lmtest.base.daemon.Daemon(pidfile, log=None)[source]
Bases:
object
A generic daemon class.
Usage: subclass the Daemon class and override the run() method
- daemonize()[source]
Do the UNIX double-fork magic.
- See:
- Stevens’ “Advanced Programming in the UNIX Environment”
(ISBN 0201563177) http://www.erlenstar.demon.co.uk/unix/faq_2.html#SEC16
lmtest.base.test_base module
Base classes for Lifemapper tests.
- class lmtest.base.test_base.LmTest(delay_time=0)[source]
Bases:
object
Base class for tests.
- add_new_test(test)[source]
Add a new test to run based on the current test status.
- Parameters
test (LmTest) – A new test to run based on the result of this test.
- get_new_tests()[source]
Get the new tests generated by the current test.
- Returns
A list of newly generated tests.
- Return type
list of LmTest
- static run_test()[source]
Run the test.
- Raises
LmTestFailure – Raised if the test fails.
lmtest.base.test_finder module
Module containing tools for finding and importing tests.
Module contents
Package containing base classes for lmtest.