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

tests: enable unittest Ctrl+C handler when SLAPOS_TEST_DEBUG is set

parent ad18eca4
...@@ -25,12 +25,14 @@ ...@@ -25,12 +25,14 @@
# #
############################################################################## ##############################################################################
import unittest
import logging import logging
import os import os
# When running with debug enabled output more logs, otherwise disable log # When running with debug enabled install Ctrl+C handler and output more logs,
# output. # otherwise disable log output.
if os.environ.get('SLAPOS_TEST_DEBUG'): if os.environ.get('SLAPOS_TEST_DEBUG'):
unittest.installHandler()
logging.basicConfig(level=logging.DEBUG) logging.basicConfig(level=logging.DEBUG)
else: else:
logging.basicConfig(filename=os.devnull) logging.basicConfig(filename=os.devnull)
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