[libvirt] [test-API PATCH 0/3] make clean function optional
Guannan Ren
gren at redhat.com
Mon Apr 16 06:11:20 UTC 2012
The set of patches is to make the writing of clean function optional.
If a testcase which doesn't dirty the testing environment, then the
TESTCASE_clean function could be optional or omitted.
Because loggers in python are static objects managed by the module itself.
When you create one, it won't be removed until the shell quit. In test-API
there are two loggers which are configured with two handlers for each.
we need to find a way to destruct these two loggers in order no to affect
other application. The idea is to clear the handlers of each logger in
destructor of CaseLog and EnvLog.
def __del__(self):
self.logger.handlers = []
rename some unclear function and variables.
for example: repos/domain/start.py
domain -> mod
start.py -> case
start() -> func
More information about the libvir-list
mailing list