diff options
author | xudan <xudan16@huawei.com> | 2017-01-20 06:46:57 +0000 |
---|---|---|
committer | xudan <xudan16@huawei.com> | 2017-01-20 06:49:28 +0000 |
commit | 9f4ce551bacb18bf424b0164a82cafb954f4b7c4 (patch) | |
tree | 3978d9a69727956180850588ebe63c468768fc48 | |
parent | c2401cd1bf3898aebeef08ca699072b1dca683f0 (diff) |
dovetail tool: use python new-style classes which inherit from object
JIRA: DOVETAIL-187
Change-Id: Id6fa50a3a3cec7a18d27ca8feb383b53836a339b
Signed-off-by: xudan <xudan16@huawei.com>
-rw-r--r-- | dovetail/cli/commands/cli_testcase.py | 2 | ||||
-rw-r--r-- | dovetail/container.py | 2 | ||||
-rw-r--r-- | dovetail/parser.py | 2 | ||||
-rw-r--r-- | dovetail/report.py | 20 | ||||
-rw-r--r-- | dovetail/testcase.py | 2 | ||||
-rw-r--r-- | dovetail/utils/dovetail_config.py | 2 | ||||
-rw-r--r-- | dovetail/utils/dovetail_logger.py | 2 |
7 files changed, 16 insertions, 16 deletions
diff --git a/dovetail/cli/commands/cli_testcase.py b/dovetail/cli/commands/cli_testcase.py index b1c38fd5..a498d495 100644 --- a/dovetail/cli/commands/cli_testcase.py +++ b/dovetail/cli/commands/cli_testcase.py @@ -17,7 +17,7 @@ from dovetail.utils.dovetail_config import DovetailConfig as dt_cfg from dovetail.testcase import Testsuite -class CliTestcase: +class CliTestcase(object): @classmethod def testsuite_load(cls): diff --git a/dovetail/container.py b/dovetail/container.py index b46ae880..3c2c2944 100644 --- a/dovetail/container.py +++ b/dovetail/container.py @@ -14,7 +14,7 @@ import utils.dovetail_utils as dt_utils from utils.dovetail_config import DovetailConfig as dt_cfg -class Container: +class Container(object): container_list = {} has_pull_latest_image = {'yardstick': False, 'functest': False} diff --git a/dovetail/parser.py b/dovetail/parser.py index 95130cd9..fdde4f9e 100644 --- a/dovetail/parser.py +++ b/dovetail/parser.py @@ -15,7 +15,7 @@ import utils.dovetail_utils as dt_utils from utils.dovetail_config import DovetailConfig as dt_cfg -class Parser: +class Parser(object): """preprocess configuration files""" logger = None diff --git a/dovetail/report.py b/dovetail/report.py index 91a4ebd4..11e3c244 100644 --- a/dovetail/report.py +++ b/dovetail/report.py @@ -30,7 +30,7 @@ def get_pass_str(passed): return 'FAIL' -class Report: +class Report(object): results = {'functest': {}, 'yardstick': {}, 'shell': {}} @@ -190,7 +190,7 @@ class Report: return result -class FunctestCrawler: +class FunctestCrawler(object): logger = None @@ -261,7 +261,7 @@ class FunctestCrawler: return None -class YardstickCrawler: +class YardstickCrawler(object): logger = None @@ -305,7 +305,7 @@ class YardstickCrawler: return None -class ShellCrawler: +class ShellCrawler(object): def __init__(self): self.type = 'shell' @@ -326,7 +326,7 @@ class ShellCrawler: return None -class CrawlerFactory: +class CrawlerFactory(object): CRAWLER_MAP = {'functest': FunctestCrawler, 'yardstick': YardstickCrawler, @@ -340,14 +340,14 @@ class CrawlerFactory: return None -class ResultChecker: +class ResultChecker(object): @staticmethod def check(): return 'PASS' -class FunctestChecker: +class FunctestChecker(object): logger = None @@ -387,7 +387,7 @@ class FunctestChecker: testcase.passed(all_passed) -class YardstickChecker: +class YardstickChecker(object): logger = None @@ -405,7 +405,7 @@ class YardstickChecker: return -class ShellChecker: +class ShellChecker(object): @staticmethod def check(testcase, result): @@ -415,7 +415,7 @@ class ShellChecker: testcase.passed(False) -class CheckerFactory: +class CheckerFactory(object): CHECKER_MAP = {'functest': FunctestChecker, 'yardstick': YardstickChecker, diff --git a/dovetail/testcase.py b/dovetail/testcase.py index ed7b832e..5ca23c4b 100644 --- a/dovetail/testcase.py +++ b/dovetail/testcase.py @@ -249,7 +249,7 @@ class TestcaseFactory(object): return None -class Testsuite: +class Testsuite(object): logger = None diff --git a/dovetail/utils/dovetail_config.py b/dovetail/utils/dovetail_config.py index 7d2c1645..1efb4d8f 100644 --- a/dovetail/utils/dovetail_config.py +++ b/dovetail/utils/dovetail_config.py @@ -12,7 +12,7 @@ import os import re -class DovetailConfig: +class DovetailConfig(object): dovetail_config = {} diff --git a/dovetail/utils/dovetail_logger.py b/dovetail/utils/dovetail_logger.py index 0fe4103c..feb7aeff 100644 --- a/dovetail/utils/dovetail_logger.py +++ b/dovetail/utils/dovetail_logger.py @@ -28,7 +28,7 @@ import sys from dovetail_config import DovetailConfig as dt_cfg -class Logger: +class Logger(object): def __init__(self, logger_name): DEBUG = os.getenv('DEBUG') |