mirror of
https://github.com/saltstack/salt.git
synced 2025-04-17 10:10:20 +00:00
fix py3 tests
This commit is contained in:
parent
dab4a8cff3
commit
e2824a7253
1 changed files with 5 additions and 0 deletions
|
@ -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…
Add table
Reference in a new issue