diff options
author | Stefan Behnel <stefan_ml@behnel.de> | 2017-03-26 10:03:48 +0200 |
---|---|---|
committer | Stefan Behnel <stefan_ml@behnel.de> | 2017-03-26 10:03:48 +0200 |
commit | 9ad0f54b97ba7672da639239ab41fd044090c628 (patch) | |
tree | a3ed62742a26871f014ca70334752e28610a4ac0 | |
parent | b0ab366735c22c6c40a2aaa52a70d469ec83fe62 (diff) | |
download | python-lxml-9ad0f54b97ba7672da639239ab41fd044090c628.tar.gz |
repair test after reverting XSLT error log changelxml-3.7
-rw-r--r-- | src/lxml/tests/test_xslt.py | 12 |
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: |