summaryrefslogtreecommitdiff
path: root/python/tests/xpathleak.py
diff options
context:
space:
mode:
Diffstat (limited to 'python/tests/xpathleak.py')
-rwxr-xr-x[-rw-r--r--]python/tests/xpathleak.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/python/tests/xpathleak.py b/python/tests/xpathleak.py
index 39f49e3..33ab61c 100644..100755
--- a/python/tests/xpathleak.py
+++ b/python/tests/xpathleak.py
@@ -42,24 +42,24 @@ badexprs = (
for expr in badexprs:
try:
ctxt.xpathEval(expr)
- except libxml2.xpathError, e:
+ except libxml2.xpathError:
pass
else:
- print "Unexpectedly legal expression:", expr
+ print("Unexpectedly legal expression:", expr)
ctxt.xpathFreeContext()
doc.freeDoc()
if err != expect:
- print "error"
- print "received %s" %(err)
- print "expected %s" %(expect)
+ print("error")
+ print("received %s" %(err))
+ print("expected %s" %(expect))
sys.exit(1)
libxml2.cleanupParser()
leakedbytes = libxml2.debugMemory(True)
if leakedbytes == 0:
- print "OK"
+ print("OK")
else:
- print "Memory leak", leakedbytes, "bytes"
+ print("Memory leak", leakedbytes, "bytes")
# drop file to .memdump file in cwd, but won't work if not compiled in
libxml2.dumpMemory()