Commit 01e8fe98 authored by Jérome Perrin's avatar Jérome Perrin

tests: disable logging on stderr

When running tests we don't want to clutter the output with logs.
Environment variable SLAPOS_TEST_DEBUG can be set to restore the
verbosity
parent 59d1cca0
......@@ -30,9 +30,9 @@ import logging
import os
# When running with debug enabled install Ctrl+C handler and output more logs,
# otherwise disable warning level logs.
# otherwise disable log output.
if os.environ.get('SLAPOS_TEST_DEBUG'):
unittest.installHandler()
logging.basicConfig(level=logging.WARNING)
logging.basicConfig(level=logging.DEBUG)
else:
logging.disable(logging.ERROR)
\ No newline at end of file
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