Author: scoder
Date: Mon Oct 30 10:20:56 2006
New Revision: 33865
Modified:
lxml/trunk/src/lxml/tests/test_xslt.py
Log:
test split
Modified: lxml/trunk/src/lxml/tests/test_xslt.py
==============================================================================
--- lxml/trunk/src/lxml/tests/test_xslt.py (original)
+++ lxml/trunk/src/lxml/tests/test_xslt.py Mon Oct 30 10:20:56 2006
@@ -192,7 +192,6 @@
style = self.parse('''\
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
- <xsl:template match="*" />
<xsl:template match="/">
<foo><xsl:value-of select="$bar" /></foo>
</xsl:template>
@@ -205,7 +204,19 @@
<foo>Bar</foo>
''',
st.tostring(res))
- # apply without needed parameter will lead to XSLTApplyError
+
+ def test_xslt_parameter_fail(self):
+ # apply() without needed parameter will lead to XSLTApplyError
+ tree = self.parse('<a><b>B</b><c>C</c></a>')
+ style = self.parse('''\
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:template match="/">
+ <foo><xsl:value-of select="$bar" /></foo>
+ </xsl:template>
+</xsl:stylesheet>''')
+
+ st = etree.XSLT(style)
self.assertRaises(etree.XSLTApplyError,
st.apply, tree)
|