summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Behnel <stefan_ml@behnel.de>2017-03-26 10:03:48 +0200
committerStefan Behnel <stefan_ml@behnel.de>2017-03-26 10:03:48 +0200
commit9ad0f54b97ba7672da639239ab41fd044090c628 (patch)
treea3ed62742a26871f014ca70334752e28610a4ac0
parentb0ab366735c22c6c40a2aaa52a70d469ec83fe62 (diff)
downloadpython-lxml-9ad0f54b97ba7672da639239ab41fd044090c628.tar.gz
repair test after reverting XSLT error log changelxml-3.7
-rw-r--r--src/lxml/tests/test_xslt.py12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/lxml/tests/test_xslt.py b/src/lxml/tests/test_xslt.py
index 63f78ecf..690659bc 100644
--- a/src/lxml/tests/test_xslt.py
+++ b/src/lxml/tests/test_xslt.py
@@ -247,7 +247,6 @@ class ETreeXSLTTestCase(HelperTestCase):
st = etree.XSLT(root_node[0])
def test_xslt_broken(self):
- tree = self.parse('<a/>')
style = self.parse('''\
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
@@ -256,9 +255,18 @@ class ETreeXSLTTestCase(HelperTestCase):
self.assertRaises(etree.XSLTParseError,
etree.XSLT, style)
+ def _test_xslt_error_log(self):
+ tree = self.parse('<a/>')
+ style = self.parse('''\
+<xsl:stylesheet version="1.0"
+ xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
+ <xsl:foo />
+</xsl:stylesheet>''')
+ self.assertRaises(etree.XSLTParseError,
+ etree.XSLT, style)
exc = None
try:
- etree.XSLT(style)
+ etree.XSLT(tree)
except etree.XSLTParseError as e:
exc = e
else: