From: Kyr Shatskyy Date: Mon, 4 Feb 2019 18:22:45 +0000 (+0100) Subject: Fix flake8 pytest F632 errors X-Git-Tag: 1.1.0~274^2 X-Git-Url: http://git-server-git.apps.pok.os.sepia.ceph.com/?a=commitdiff_plain;h=refs%2Fpull%2F1256%2Fhead;p=teuthology.git Fix flake8 pytest F632 errors Signed-off-by: Kyr --- diff --git a/teuthology/suite/run.py b/teuthology/suite/run.py index c84171317..e34e6012d 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 fb6a4d9fe..946126d80 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 a1980c210..9843a28fb 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: