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:
@ -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"
|
||||
|
Reference in New Issue
Block a user