summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Lib/test/test_xml_etree.py5
-rw-r--r--Lib/test/test_xml_etree_c.py5
2 files changed, 4 insertions, 6 deletions
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index c8dd344..4788d3a 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -183,9 +183,8 @@ def parseliteral():
<html><body>text</body></html>
>>> print(ET.tostring(element))
<html><body>text</body></html>
- >>> print(ET.tostring(element, "ascii"))
- <?xml version='1.0' encoding='ascii'?>
- <html><body>text</body></html>
+ >>> print(repr(ET.tostring(element, "ascii")))
+ b'<?xml version=\'1.0\' encoding=\'ascii\'?>\n<html><body>text</body></html>'
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
>>> len(ids)
0
diff --git a/Lib/test/test_xml_etree_c.py b/Lib/test/test_xml_etree_c.py
index 22d2662..86f1853 100644
--- a/Lib/test/test_xml_etree_c.py
+++ b/Lib/test/test_xml_etree_c.py
@@ -175,9 +175,8 @@ def parseliteral():
<html><body>text</body></html>
>>> print(ET.tostring(element))
<html><body>text</body></html>
- >>> print(ET.tostring(element, "ascii"))
- <?xml version='1.0' encoding='ascii'?>
- <html><body>text</body></html>
+ >>> print(repr(ET.tostring(element, "ascii")))
+ b'<?xml version=\'1.0\' encoding=\'ascii\'?>\n<html><body>text</body></html>'
>>> _, ids = ET.XMLID("<html><body>text</body></html>")
>>> len(ids)
0