mirror of
https://gitlab.gnome.org/GNOME/libxslt
synced 2025-07-29 15:41:13 +03:00
tests: Fix out-of-tree Python tests
This commit is contained in:
@ -1,15 +1,16 @@
|
||||
#!/usr/bin/env python
|
||||
import os
|
||||
import sys
|
||||
import libxml2
|
||||
# Memory debug specific
|
||||
libxml2.debugMemory(1)
|
||||
import libxslt
|
||||
|
||||
basedir = os.path.dirname(os.path.realpath(__file__))
|
||||
|
||||
|
||||
styledoc = libxml2.parseFile("test.xsl")
|
||||
styledoc = libxml2.parseFile("%s/test.xsl" % basedir)
|
||||
style = libxslt.parseStylesheetDoc(styledoc)
|
||||
doc = libxml2.parseFile("test.xml")
|
||||
doc = libxml2.parseFile("%s/test.xml" % basedir)
|
||||
result = style.applyStylesheet(doc, None)
|
||||
style.saveResultToFilename("foo", result, 0)
|
||||
stringval = style.saveResultToString(result)
|
||||
|
Reference in New Issue
Block a user