diff options
author | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-03-29 15:55:51 +0200 |
---|---|---|
committer | Nick Wellnhofer <wellnhofer@aevum.de> | 2022-03-29 15:55:51 +0200 |
commit | 649ddb4b2fe90ab0a5e8f6eb87c18eed7d07380a (patch) | |
tree | 24e76e978d27cd6ed934c691f0c282f90417769a /xstc | |
parent | 92bff8661446b17ae8d02045d94d521d881657a6 (diff) | |
download | libxml2-649ddb4b2fe90ab0a5e8f6eb87c18eed7d07380a.tar.gz |
Port some test scripts to Python 3
Diffstat (limited to 'xstc')
-rwxr-xr-x | xstc/xstc.py | 8 |
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] |