aboutsummaryrefslogtreecommitdiffstats
path: root/functest/tests/unit/core
diff options
context:
space:
mode:
Diffstat (limited to 'functest/tests/unit/core')
-rw-r--r--functest/tests/unit/core/test_feature.py7
-rw-r--r--functest/tests/unit/core/test_pytest_suite_runner.py3
-rw-r--r--functest/tests/unit/core/test_testcase.py3
-rw-r--r--functest/tests/unit/core/test_vnf.py3
4 files changed, 6 insertions, 10 deletions
diff --git a/functest/tests/unit/core/test_feature.py b/functest/tests/unit/core/test_feature.py
index 8de42ec5..0160c8e1 100644
--- a/functest/tests/unit/core/test_feature.py
+++ b/functest/tests/unit/core/test_feature.py
@@ -17,10 +17,6 @@ import mock
from functest.core import feature
from functest.core import testcase
-# logging must be disabled else it calls time.time()
-# what will break these unit tests.
-logging.disable(logging.CRITICAL)
-
class FeatureTestingBase(unittest.TestCase):
@@ -95,4 +91,7 @@ class BashFeatureTesting(FeatureTestingBase):
if __name__ == "__main__":
+ # logging must be disabled else it calls time.time()
+ # what will break these unit tests.
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)
diff --git a/functest/tests/unit/core/test_pytest_suite_runner.py b/functest/tests/unit/core/test_pytest_suite_runner.py
index 15e5bd73..07ac7906 100644
--- a/functest/tests/unit/core/test_pytest_suite_runner.py
+++ b/functest/tests/unit/core/test_pytest_suite_runner.py
@@ -18,8 +18,6 @@ from functest.core import testcase
class PyTestSuiteRunnerTesting(unittest.TestCase):
- logging.disable(logging.CRITICAL)
-
def setUp(self):
self.psrunner = pytest_suite_runner.PyTestSuiteRunner()
self.result = mock.Mock()
@@ -48,4 +46,5 @@ class PyTestSuiteRunnerTesting(unittest.TestCase):
if __name__ == "__main__":
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)
diff --git a/functest/tests/unit/core/test_testcase.py b/functest/tests/unit/core/test_testcase.py
index 2adf4a6d..ef0983cc 100644
--- a/functest/tests/unit/core/test_testcase.py
+++ b/functest/tests/unit/core/test_testcase.py
@@ -23,8 +23,6 @@ class TestCaseTesting(unittest.TestCase):
"""The class testing TestCase."""
# pylint: disable=missing-docstring,too-many-public-methods
- logging.disable(logging.CRITICAL)
-
_case_name = "base"
_project_name = "functest"
_published_result = "PASS"
@@ -225,4 +223,5 @@ class TestCaseTesting(unittest.TestCase):
if __name__ == "__main__":
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)
diff --git a/functest/tests/unit/core/test_vnf.py b/functest/tests/unit/core/test_vnf.py
index 793e9576..e322773e 100644
--- a/functest/tests/unit/core/test_vnf.py
+++ b/functest/tests/unit/core/test_vnf.py
@@ -21,8 +21,6 @@ from functest.core import testcase
class VnfBaseTesting(unittest.TestCase):
- logging.disable(logging.CRITICAL)
-
def setUp(self):
self.test = vnf.VnfOnBoarding(
project='functest', case_name='aaa')
@@ -165,4 +163,5 @@ class VnfBaseTesting(unittest.TestCase):
if __name__ == "__main__":
+ logging.disable(logging.CRITICAL)
unittest.main(verbosity=2)