From: Thanh Ha Date: Fri, 30 Jul 2021 22:36:22 +0000 (-0400) Subject: Refactor: Fix Flake8 E711 X-Git-Tag: v0.35.6~5 X-Git-Url: https://gerrit.linuxfoundation.org/infra/gitweb?a=commitdiff_plain;h=58239e4b9ce35e6a083c3c01edd7513d3cc083e7;p=releng%2Flftools.git Refactor: Fix Flake8 E711 Comparisons to the singleton objects, like True, False, and None, should be done with identity, not equality. Use “is” or “is not” Ref: https://www.flake8rules.com/rules/E711.html Signed-off-by: Thanh Ha Change-Id: I33e80228341b93bdeb6cae1b587b8b19275c589d --- diff --git a/tests/test_nexus.py b/tests/test_nexus.py index 5887eda4..4cc840dd 100644 --- a/tests/test_nexus.py +++ b/tests/test_nexus.py @@ -115,7 +115,7 @@ def test_create_repo_target_regex(): for url in test_url_3_par: a = util.create_repo_target_regex(url[1], url[0]) a_regex = re.compile(a) - assert a_regex.match(url[2]) != None + assert a_regex.match(url[2]) is not None test_url_2_par = [ ["org.o-ran-sc.org", "/org/o-ran-sc/org/"], @@ -135,4 +135,4 @@ def test_create_repo_target_regex(): for url in test_url_2_par: a = util.create_repo_target_regex(url[0]) a_regex = re.compile(a) - assert a_regex.match(url[1]) != None + assert a_regex.match(url[1]) is not None