Skip to content

Commit

Permalink
Fix SyntaxWarning due to misuse of 'is' instead of equality.
Browse files Browse the repository at this point in the history
  • Loading branch information
glanois committed Mar 9, 2021
1 parent 48bf84d commit 2142549
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion python/python3/cxxtest/cxx_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -2087,7 +2087,7 @@ def p_error(p):
tmp = "Syntax error at end of file."
else:
tmp = "Syntax error at token "
if p.type is "":
if p.type == "":
tmp = tmp + "''"
else:
tmp = tmp + str(p.type)
Expand Down
4 changes: 2 additions & 2 deletions python/python3/cxxtest/cxxtest_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def scanInputFiles(files, _options):
#
for file in files:
scanInputFile(file)
if len(suites) is 0 and not options.root:
if len(suites) == 0 and not options.root:
abort( 'No tests defined' )
return [options,suites]

Expand Down Expand Up @@ -233,7 +233,7 @@ def closeSuite():
'''Close current suite and add it to the list if valid'''
global suite
if suite is not None:
if len(suite['tests']) is not 0:
if len(suite['tests']) != 0:
verifySuite(suite)
rememberSuite(suite)
suite = None
Expand Down

0 comments on commit 2142549

Please sign in to comment.