From 1358b3c96371c48f16ad7691bb37499229f1c373 Mon Sep 17 00:00:00 2001 From: Cédric Ollivier Date: Fri, 9 Feb 2018 10:20:09 +0100 Subject: Unlink feature from constants MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Saving results dir as class attribute seems better in the context of xtesting. Change-Id: If40303d07d3be9bdc09d990f560cbeda429fd642 Signed-off-by: Cédric Ollivier --- functest/core/feature.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'functest') diff --git a/functest/core/feature.py b/functest/core/feature.py index 3200dad8..65fd5a08 100644 --- a/functest/core/feature.py +++ b/functest/core/feature.py @@ -18,7 +18,6 @@ import subprocess import time import functest.core.testcase as base -from functest.utils.constants import CONST __author__ = ("Serena Feng , " "Cedric Ollivier ") @@ -28,11 +27,11 @@ class Feature(base.TestCase): """Base model for single feature.""" __logger = logging.getLogger(__name__) + dir_results = "/home/opnfv/functest/results" def __init__(self, **kwargs): super(Feature, self).__init__(**kwargs) - self.result_file = "{}/{}.log".format( - CONST.__getattribute__('dir_results'), self.case_name) + self.result_file = "{}/{}.log".format(self.dir_results, self.case_name) try: module = kwargs['run']['module'] self.logger = logging.getLogger(module) -- cgit 1.2.3-korg