From 632d660c262d791eb65324d8510722269f79b1ec Mon Sep 17 00:00:00 2001 From: Kyr Shatskyy Date: Mon, 4 Feb 2019 19:22:45 +0100 Subject: [PATCH] Fix flake8 pytest F632 errors Signed-off-by: Kyr --- teuthology/suite/run.py | 2 +- teuthology/suite/test/test_build_matrix.py | 8 ++++---- teuthology/task/lockfile.py | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index c84171317b..e34e6012d3 100644 --- a/teuthology/suite/run.py +++ b/teuthology/suite/run.py @@ -136,7 +136,7 @@ class Run(object): if kernel_hash: log.info("kernel sha1: {hash}".format(hash=kernel_hash)) kernel_dict = dict(kernel=dict(kdb=True, sha1=kernel_hash)) - if kernel_hash is not 'distro': + if kernel_hash != 'distro': kernel_dict['kernel']['flavor'] = self.args.kernel_flavor else: kernel_dict = dict() diff --git a/teuthology/suite/test/test_build_matrix.py b/teuthology/suite/test/test_build_matrix.py index fb6a4d9fef..946126d801 100644 --- a/teuthology/suite/test/test_build_matrix.py +++ b/teuthology/suite/test/test_build_matrix.py @@ -621,14 +621,14 @@ class TestSubset(object): x += 1 def generate_tree( max_facets, max_fanout, max_depth, namegen, top=True): - if max_depth is 0: + if max_depth == 0: return None - if max_facets is 0: + if max_facets == 0: return None items = random.choice(range(max_fanout)) - if items is 0 and top: + if items == 0 and top: items = 1 - if items is 0: + if items == 0: return None sub_max_facets = max_facets / items tree = {} diff --git a/teuthology/task/lockfile.py b/teuthology/task/lockfile.py index a1980c2103..9843a28fbc 100644 --- a/teuthology/task/lockfile.py +++ b/teuthology/task/lockfile.py @@ -225,7 +225,7 @@ def lock_one(op, ctx): raise if bool(op["expectfail"]): result = 1 - if result is 1: + if result == 1: if bool(op["expectfail"]): log.info("failed as expected for op {op_}".format(op_=op)) else: -- 2.39.5