mirror of
https://github.com/valitydev/salt.git
synced 2024-11-07 08:58:59 +00:00
fix py3 tests
This commit is contained in:
parent
dab4a8cff3
commit
e2824a7253
@ -33,6 +33,7 @@ from tests.support.xmlunit import HAS_XMLRUNNER, XMLTestRunner
|
||||
|
||||
# Import 3rd-party libs
|
||||
import salt.ext.six as six
|
||||
import salt.utils
|
||||
try:
|
||||
from tests.support.ext import console
|
||||
WIDTH, HEIGHT = console.getTerminalSize()
|
||||
@ -455,6 +456,10 @@ class SaltTestingParser(optparse.OptionParser):
|
||||
logging_level = logging.INFO
|
||||
else:
|
||||
logging_level = logging.ERROR
|
||||
if salt.utils.is_windows():
|
||||
os.environ['TESTS_LOG_LEVEL'] = six.binary_type(self.options.verbosity)
|
||||
else:
|
||||
os.environ['TESTS_LOG_LEVEL'] = six.text_type(self.options.verbosity)
|
||||
consolehandler.setLevel(logging_level)
|
||||
logging.root.addHandler(consolehandler)
|
||||
log.info('Runtests logging has been setup')
|
||||
|
Loading…
Reference in New Issue
Block a user