Commit ea500a46 authored by Jérome Perrin's avatar Jérome Perrin

testing/testcase: install unittest Ctrl+C handler earlier

This also makes development easier, because we can make a temporary
change to skip setupModule not to reinstall software when we are working
only on the test and we don't need to recompile the software.
parent 959bb6d9
......@@ -127,6 +127,9 @@ def makeModuleSetUpAndTestCaseClass(
logging.DEBUG if (verbose or debug) else logging.WARNING)
logger.addHandler(console_handler)
if debug:
unittest.installHandler()
# TODO: fail if already running ?
try:
slap = StandaloneSlapOS(
......@@ -162,8 +165,6 @@ def makeModuleSetUpAndTestCaseClass(
def setUpModule():
# type: () -> None
if debug:
unittest.installHandler()
installSoftwareUrlList(cls, [software_url], debug=debug)
return setUpModule, SlapOSInstanceTestCase_
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment