1
0
mirror of https://gitlab.gnome.org/GNOME/libxml2.git synced 2025-07-20 16:43:05 +03:00

adding error redirections and preformat to a python handler cleanup made

* python/Makefile.am python/libxml.c python/libxml2-python-api.xml
  python/libxml2class.txt: adding error redirections and preformat
  to a python handler
* python/tests/Makefile.am python/tests/*.py: cleanup made all
  tests self checking
Daniel
This commit is contained in:
Daniel Veillard
2002-02-02 21:49:17 +00:00
parent 7fd7a94aa8
commit 5d81903b06
11 changed files with 184 additions and 28 deletions

View File

@ -1,10 +1,18 @@
#!/usr/bin/python -u
import sys
import libxml2
doc = libxml2.parseFile("tst.xml")
print doc.name
if doc.name != "tst.xml":
print "doc.name failed"
sys.exit(1)
root = doc.children
print root.name
if root.name != "doc":
print "root.name failed"
sys.exit(1)
child = root.children
print child.name
if child.name != "foo":
print "child.name failed"
sys.exit(1)
doc.freeDoc()
print "OK"