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.
This commit is contained in:
Eli Bendersky 2012-03-16 15:29:50 +02:00
parent 68ca5a6bcc
commit 2b711409c7

View file

@ -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):