aboutsummaryrefslogtreecommitdiff
path: root/test/cxxtest
diff options
context:
space:
mode:
authorJohannes Schickel2010-11-19 18:19:34 +0000
committerJohannes Schickel2010-11-19 18:19:34 +0000
commit199a1c761960f1928d8ce80d607f6eedadc67957 (patch)
tree457676e7fe48978706b91ef35aa9ab3991c1a448 /test/cxxtest
parentdfb2b9cd2f0b5082df27f2928732c9f69b110b1c (diff)
downloadscummvm-rg350-199a1c761960f1928d8ce80d607f6eedadc67957.tar.gz
scummvm-rg350-199a1c761960f1928d8ce80d607f6eedadc67957.tar.bz2
scummvm-rg350-199a1c761960f1928d8ce80d607f6eedadc67957.zip
TEST: Make cxxtest work with Python 3.1 too.
svn-id: r54387
Diffstat (limited to 'test/cxxtest')
-rwxr-xr-xtest/cxxtest/cxxtestgen.py12
1 files changed, 6 insertions, 6 deletions
diff --git a/test/cxxtest/cxxtestgen.py b/test/cxxtest/cxxtestgen.py
index 831d23ab41..4145c3ca3e 100755
--- a/test/cxxtest/cxxtestgen.py
+++ b/test/cxxtest/cxxtestgen.py
@@ -57,7 +57,7 @@ def main():
def usage( problem = None ):
'''Print usage info and exit'''
if problem is None:
- print usageString()
+ print( usageString() )
sys.exit(0)
else:
sys.stderr.write( usageString() )
@@ -82,7 +82,7 @@ def parseCommandline():
'error-printer', 'abort-on-fail', 'have-std', 'no-std',
'have-eh', 'no-eh', 'template=', 'include=',
'root', 'part', 'no-static-init', 'factor', 'longlong='] )
- except getopt.error, problem:
+ except getopt.error as problem:
usage( problem )
setOptions( options )
return setFiles( patterns )
@@ -315,7 +315,7 @@ def scanLineForDestroy( suite, lineNo, line ):
def cstr( str ):
'''Convert a string to its C representation'''
- return '"' + string.replace( str, '\\', '\\\\' ) + '"'
+ return '"' + str.replace( '\\', '\\\\' ) + '"'
def addSuiteCreateDestroy( suite, which, line ):
@@ -335,10 +335,10 @@ def closeSuite():
def verifySuite(suite):
'''Verify current suite is legal'''
- if suite.has_key('create') and not suite.has_key('destroy'):
+ if 'create' in suite and not 'destroy' in suite:
abort( '%s:%s: Suite %s has createSuite() but no destroySuite()' %
(suite['file'], suite['create'], suite['name']) )
- if suite.has_key('destroy') and not suite.has_key('create'):
+ if 'destroy' in suite and not 'create' in suite:
abort( '%s:%s: Suite %s has destroySuite() but no createSuite()' %
(suite['file'], suite['destroy'], suite['name']) )
@@ -474,7 +474,7 @@ def isGenerated(suite):
def isDynamic(suite):
'''Checks whether a suite is dynamic'''
- return suite.has_key('create')
+ return 'create' in suite
lastIncluded = ''
def writeInclude(output, file):