summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_xml_etree.py
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2012-03-16 13:29:50 (GMT)
committerEli Bendersky <eliben@gmail.com>2012-03-16 13:29:50 (GMT)
commit2b711409c7fe8223aebf23dd4da2b6d0aaf5c339 (patch)
tree02cfb5d1fd73ec3a9ac7045f26237f6f864e7118 /Lib/test/test_xml_etree.py
parent68ca5a6bcc5712eaebbdf40a7ff3ea49f8654c34 (diff)
downloadcpython-2b711409c7fe8223aebf23dd4da2b6d0aaf5c339.zip
cpython-2b711409c7fe8223aebf23dd4da2b6d0aaf5c339.tar.gz
cpython-2b711409c7fe8223aebf23dd4da2b6d0aaf5c339.tar.bz2
Add a test that makes sure TreeBuilder can be passed element_factory in the
constructor. Marked as expectedFailure since it currently fails for the C implementation.
Diffstat (limited to 'Lib/test/test_xml_etree.py')
-rw-r--r--Lib/test/test_xml_etree.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index c1dce04..50a00ac 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1905,6 +1905,11 @@ class TreeBuilderTest(unittest.TestCase):
parser.feed(self.sample1)
self.assertIsNone(parser.close())
+ # XXX in _elementtree, the constructor of TreeBuilder expects no
+ # arguments
+ @unittest.expectedFailure
+ def test_element_factory(self):
+ tb = ET.TreeBuilder(element_factory=lambda: ET.Element())
@unittest.expectedFailure # XXX issue 14007 with C ElementTree
def test_doctype(self):