summaryrefslogtreecommitdiff
path: root/python/tests/xpath.py
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>2002-02-03 20:13:06 +0000
committerDaniel Veillard <veillard@src.gnome.org>2002-02-03 20:13:06 +0000
commit4e1b26cfeba7f5fad4f8bd12fb5ce7029f930b79 (patch)
tree9910711cd4e80cb70d4a1a7579c6240dd2320d6e /python/tests/xpath.py
parent26f1dcc5bda9fbd0711bd93f72ed20d4eaec3cbf (diff)
downloadlibxml2-4e1b26cfeba7f5fad4f8bd12fb5ce7029f930b79.tar.gz
change a small bit in the way valididy error messages get initialized
* parserInternals.c: change a small bit in the way valididy error messages get initialized * python/TODO python/libxml.c python/libxml2-python-api.xml python/libxml2class.txt python/libxml_wrap.h python/types.c: added some memory debugging to track leaks at the libxml2 level * python/tests/*.py: changed all tests to check for leaks, there is just one left in XPath extension registrations. daniel
Diffstat (limited to 'python/tests/xpath.py')
-rwxr-xr-xpython/tests/xpath.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/python/tests/xpath.py b/python/tests/xpath.py
index 49a697f6..0d35a99e 100755
--- a/python/tests/xpath.py
+++ b/python/tests/xpath.py
@@ -6,6 +6,9 @@
import sys
import libxml2
+# Memory debug specific
+libxml2.debugMemory(1)
+
doc = libxml2.parseFile("tst.xml")
if doc.name != "tst.xml":
print "doc.name error"
@@ -27,4 +30,12 @@ while i > 0:
res = ctxt.xpathEval("//*")
doc.freeDoc()
i = i -1
-print "OK"
+del ctxt
+
+# Memory debug specific
+libxml2.cleanupParser()
+if libxml2.debugMemory(1) == 0:
+ print "OK"
+else:
+ print "Memory leak %d bytes" % (libxml2.debugMemory(1))
+ libxml2.dumpMemory()