Fix 2 issues related to logger in pytest_suite_runer.py 27/34927/1
authorCédric Ollivier <cedric.ollivier@orange.com>
Wed, 17 May 2017 22:46:45 +0000 (00:46 +0200)
committerCédric Ollivier <cedric.ollivier@orange.com>
Wed, 17 May 2017 22:50:02 +0000 (00:50 +0200)
logging.ini requires the full name otherwise all log messages are lost.
Calling basicConfig() is useless as it has been correctly configured by
run_tests.py before.

Change-Id: I03663c01f795b1b844239a9e24379faa529829aa
Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
functest/core/pytest_suite_runner.py

index 9d78735..0dd860d 100644 (file)
@@ -13,8 +13,6 @@ import time
 
 from functest.core import testcase
 
-logging.basicConfig()
-
 
 class PyTestSuiteRunner(testcase.TestCase):
     """
@@ -23,8 +21,8 @@ class PyTestSuiteRunner(testcase.TestCase):
     """
     def __init__(self, **kwargs):
         super(PyTestSuiteRunner, self).__init__(**kwargs)
-        self.logger = logging.getLogger(self.__class__.__name__)
         self.suite = None
+        self.logger = logging.getLogger(__name__)
 
     def run(self, **kwargs):
         """