summaryrefslogtreecommitdiff
path: root/xstc
diff options
context:
space:
mode:
authorNick Wellnhofer <wellnhofer@aevum.de>2022-03-29 15:55:51 +0200
committerNick Wellnhofer <wellnhofer@aevum.de>2022-03-29 15:55:51 +0200
commit649ddb4b2fe90ab0a5e8f6eb87c18eed7d07380a (patch)
tree24e76e978d27cd6ed934c691f0c282f90417769a /xstc
parent92bff8661446b17ae8d02045d94d521d881657a6 (diff)
downloadlibxml2-649ddb4b2fe90ab0a5e8f6eb87c18eed7d07380a.tar.gz
Port some test scripts to Python 3
Diffstat (limited to 'xstc')
-rwxr-xr-xxstc/xstc.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/xstc/xstc.py b/xstc/xstc.py
index 21c1f419..7b119bd3 100755
--- a/xstc/xstc.py
+++ b/xstc/xstc.py
@@ -6,7 +6,7 @@
#
import sys, os
-import exceptions, optparse
+import optparse
import libxml2
opa = optparse.OptionParser()
@@ -322,7 +322,7 @@ class XSTCTestCase:
sys.stdout.write("'%s'\n" % self.name)
try:
self.validate()
- except (Exception, libxml2.parserError, libxml2.treeError), e:
+ except (Exception, libxml2.parserError, libxml2.treeError) as e:
self.failExcept(e)
def parseSchema(fileName):
@@ -359,7 +359,7 @@ class XSTCSchemaTest(XSTCTestCase):
if schema is None:
self.debugMsg("schema is None")
self.debugMsg("checking for IO errors...")
- if self.isIOError(file, "schema"):
+ if self.isIOError(filePath, "schema"):
return
self.debugMsg("checking schema result")
if (schema is None and self.val) or (schema is not None and self.val == 0):
@@ -614,7 +614,7 @@ class XSTCTestRunner:
def addToCombines(self, test):
found = False
- if self.combinesRan.has_key(test.combineName):
+ if test.combineName in self.combinesRan:
self.combinesRan[test.combineName].append(test)
else:
self.combinesRan[test.combineName] = [test]