diff options
author | Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com> | 2016-01-13 16:19:58 +0100 |
---|---|---|
committer | Jörgen Karlsson <jorgen.w.karlsson@ericsson.com> | 2016-01-13 16:48:17 +0000 |
commit | ad3ec6ae195e9cda3af316d5cc47de0e948abe4c (patch) | |
tree | bdac6e82f26150f153be3ed0f699b60e62094a5d /yardstick/benchmark | |
parent | fed1e1f6b8508e5a055576583adc0fe1d646fd73 (diff) |
Fix flake8 errors
Change-Id: I14f21092f5e97abf0629a92a27062846a6d3130b
JIRA:-
Signed-off-by: Jo¶rgen Karlsson <jorgen.w.karlsson@ericsson.com>
(cherry picked from commit 791323df72d8bf4f4f4c32a1e7273721f2adc349)
Diffstat (limited to 'yardstick/benchmark')
-rwxr-xr-x | yardstick/benchmark/runners/arithmetic.py | 3 | ||||
-rwxr-xr-x | yardstick/benchmark/runners/base.py | 4 | ||||
-rw-r--r-- | yardstick/benchmark/scenarios/networking/ping.py | 4 | ||||
-rw-r--r-- | yardstick/benchmark/scenarios/networking/ping6.py | 4 |
4 files changed, 8 insertions, 7 deletions
diff --git a/yardstick/benchmark/runners/arithmetic.py b/yardstick/benchmark/runners/arithmetic.py index 7e516ea1e..035f9e295 100755 --- a/yardstick/benchmark/runners/arithmetic.py +++ b/yardstick/benchmark/runners/arithmetic.py @@ -58,7 +58,8 @@ def _worker_process(queue, cls, method_name, scenario_cfg, sla_action = scenario_cfg["sla"].get("action", "assert") # To both be able to include the stop value and handle backwards stepping - margin = lambda start, stop: -1 if start > stop else 1 + def margin(start, stop): + return -1 if start > stop else 1 param_iters = \ [xrange(d['start'], d['stop'] + margin(d['start'], d['stop']), diff --git a/yardstick/benchmark/runners/base.py b/yardstick/benchmark/runners/base.py index 9925ace2f..56a394e1c 100755 --- a/yardstick/benchmark/runners/base.py +++ b/yardstick/benchmark/runners/base.py @@ -14,14 +14,14 @@ import subprocess import time import traceback -log = logging.getLogger(__name__) - from oslo_config import cfg import yardstick.common.utils as utils from yardstick.benchmark.scenarios import base as base_scenario from yardstick.dispatcher.base import Base as DispatcherBase +log = logging.getLogger(__name__) + CONF = cfg.CONF diff --git a/yardstick/benchmark/scenarios/networking/ping.py b/yardstick/benchmark/scenarios/networking/ping.py index c62c79e54..fc4176650 100644 --- a/yardstick/benchmark/scenarios/networking/ping.py +++ b/yardstick/benchmark/scenarios/networking/ping.py @@ -72,8 +72,8 @@ class Ping(base.Scenario): if "sla" in self.scenario_cfg: sla_max_rtt = int(self.scenario_cfg["sla"]["max_rtt"]) - assert result["rtt"] <= sla_max_rtt, "rtt %f > sla:max_rtt(%f); " % \ - (result["rtt"], sla_max_rtt) + assert result["rtt"] <= sla_max_rtt, \ + "rtt %f > sla:max_rtt(%f); " % (result["rtt"], sla_max_rtt) else: LOG.error("ping '%s' '%s' timeout", options, destination) diff --git a/yardstick/benchmark/scenarios/networking/ping6.py b/yardstick/benchmark/scenarios/networking/ping6.py index 629f62be5..5d878eb8f 100644 --- a/yardstick/benchmark/scenarios/networking/ping6.py +++ b/yardstick/benchmark/scenarios/networking/ping6.py @@ -90,8 +90,8 @@ class Ping6(base.Scenario): # pragma: no cover if "sla" in self.scenario_cfg: sla_max_rtt = int(self.scenario_cfg["sla"]["max_rtt"]) - assert result["rtt"] <= sla_max_rtt, "rtt %f > sla:max_rtt(%f); " % \ - (result["rtt"], sla_max_rtt) + assert result["rtt"] <= sla_max_rtt, \ + "rtt %f > sla:max_rtt(%f); " % (result["rtt"], sla_max_rtt) else: LOG.error("ping6 timeout") self.run_done = True |