Project

General

Profile

Actions

Bug #13308

closed

testrunner/run needs updates for python 3.9

Added by Andy Fiddaman 6 months ago. Updated 6 months ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
tests
Start date:
Due date:
% Done:

100%

Estimated time:
Difficulty:
Bite-size
Tags:
Gerrit CR:

Description

Python 3.9 is more picky about the incorrect usage of is with a literal:

bloody:illumos:upstream_gate% python3.9 usr/src/test/test-runner/cmd/run
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:109: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif self.returncode is 0:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:112: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif self.returncode is 3 or self.returncode is 4:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:112: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif self.returncode is 3 or self.returncode is 4:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:115: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  elif self.returncode is not 0:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:308: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  elif self.result.result is not 'PASS':
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:404: SyntaxWarning: "is" with a literal. Did you mean "=="?
  cont = pretest.result.result is 'PASS'
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:479: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  return len(self.tests) is not 0
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:497: SyntaxWarning: "is" with a literal. Did you mean "=="?
  cont = pretest.result.result is 'PASS'
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:715: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if options.cmd is not 'wrconfig':
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:753: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if Result.total is 0:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:758: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if Result.runresults[key] is not 0:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:800: SyntaxWarning: "is not" with a literal. Did you mean "!="?
  if p.returncode is not 0:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:836: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if option.dest is 'runfile' and '-w' in parser.rargs or \
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:837: SyntaxWarning: "is" with a literal. Did you mean "=="?
  option.dest is 'template' and '-c' in parser.rargs:
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:843: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if option.dest is 'runfile':
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:845: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if option.dest is 'template':
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:905: SyntaxWarning: "is" with a literal. Did you mean "=="?
  if options.cmd is 'runtests':
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:907: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif options.cmd is 'rdconfig':
/data/omnios-build/omniosorg/bloody/illumos/usr/src/test/test-runner/cmd/run:909: SyntaxWarning: "is" with a literal. Did you mean "=="?
  elif options.cmd is 'wrconfig':
Actions

Also available in: Atom PDF