mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
bpo-43399: Fix ElementTree.extend not working on iterators (GH-24751)
This commit is contained in:
parent
73b20ae2fb
commit
51a85ddce8
4 changed files with 7 additions and 1 deletions
|
@ -330,6 +330,9 @@ class ElementTreeTest(unittest.TestCase):
|
|||
elem.extend([e])
|
||||
self.serialize_check(elem, '<body><tag /><tag2 /></body>')
|
||||
elem.remove(e)
|
||||
elem.extend(iter([e]))
|
||||
self.serialize_check(elem, '<body><tag /><tag2 /></body>')
|
||||
elem.remove(e)
|
||||
|
||||
element = ET.Element("tag", key="value")
|
||||
self.serialize_check(element, '<tag key="value" />') # 1
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue