mirror of
https://github.com/python/cpython.git
synced 2025-09-26 10:19:53 +00:00
Fix repr of tree Element on windows.
This commit is contained in:
parent
3e8c189faa
commit
e2e81e8fcd
2 changed files with 12 additions and 10 deletions
|
@ -131,7 +131,7 @@ def check_element(element):
|
|||
# element tree tests
|
||||
|
||||
def interface():
|
||||
"""
|
||||
r"""
|
||||
Test element tree interface.
|
||||
|
||||
>>> element = ET.Element("tag")
|
||||
|
@ -139,10 +139,11 @@ def interface():
|
|||
>>> tree = ET.ElementTree(element)
|
||||
>>> check_element(tree.getroot())
|
||||
|
||||
>>> element = ET.Element("tag", key="value")
|
||||
>>> element = ET.Element("t\xe4g", key="value")
|
||||
>>> tree = ET.ElementTree(element)
|
||||
>>> repr(element) # doctest: +ELLIPSIS
|
||||
"<Element 'tag' at 0x...>"
|
||||
"<Element 't\\xe4g' at 0x...>"
|
||||
>>> element = ET.Element("tag", key="value")
|
||||
|
||||
Make sure all standard element methods exist.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue