[Python-checkins] cpython: Add a test that makes sure TreeBuilder can be passed element_factory in the

eli.bendersky python-checkins at python.org
Fri Mar 16 14:33:49 CET 2012


http://hg.python.org/cpython/rev/bf508633cf47
changeset: 75734:bf508633cf47
parent: 75732:5d118a154ba3
user: Eli Bendersky <eliben at gmail.com>
date: Fri Mar 16 15:29:50 2012 +0200
summary:
 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.
files:
 Lib/test/test_xml_etree.py | 5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -1905,6 +1905,11 @@
 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):
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /