Commit f54acb48 authored by Andrei Vagin's avatar Andrei Vagin

zdtm: fix warnings from flake8

test/zdtm.py:1535:30: E711 comparison to None should be 'if cond is not None:'
test/zdtm.py:1538:31: E711 comparison to None should be 'if cond is not None:'
test/zdtm.py:1601:31: E711 comparison to None should be 'if cond is not None:'
Signed-off-by: 's avatarAndrei Vagin <avagin@virtuozzo.com>
parent 7d12ce29
...@@ -1431,11 +1431,10 @@ class launcher: ...@@ -1431,11 +1431,10 @@ class launcher:
self.__runtest += 1 self.__runtest += 1
self.__nr_skip += 1 self.__nr_skip += 1
if self.__junit_test_cases != None: if self.__junit_test_cases is not None:
tc = TestCase(name) tc = TestCase(name)
tc.add_skipped_info(reason) tc.add_skipped_info(reason)
if self.__junit_test_cases != None: self.__junit_test_cases.append(tc)
self.__junit_test_cases.append(tc)
if self.__file_report: if self.__file_report:
testline = "ok %d - %s # SKIP %s" % (self.__runtest, name, reason) testline = "ok %d - %s # SKIP %s" % (self.__runtest, name, reason)
print >> self.__file_report, testline print >> self.__file_report, testline
...@@ -1481,7 +1480,7 @@ class launcher: ...@@ -1481,7 +1480,7 @@ class launcher:
if pid != 0: if pid != 0:
sub = self.__subs.pop(pid) sub = self.__subs.pop(pid)
tc = None tc = None
if self.__junit_test_cases != None: if self.__junit_test_cases is not None:
tc = TestCase(sub['name'], elapsed_sec=time.time() - sub['start']) tc = TestCase(sub['name'], elapsed_sec=time.time() - sub['start'])
self.__junit_test_cases.append(tc) self.__junit_test_cases.append(tc)
if status != 0: if status != 0:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment