diff options
author | Guido van Rossum <guido@python.org> | 2007-10-10 22:48:24 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2007-10-10 22:48:24 (GMT) |
commit | b62e8a8062ff81f0f5d80b25aa0fb6b2457c721c (patch) | |
tree | 435d900d762f6a9a165b8c97f270343e3399118a /Lib | |
parent | c5724deb1a1e68d5bdc43d474cf3544d42d87f0a (diff) | |
download | cpython-b62e8a8062ff81f0f5d80b25aa0fb6b2457c721c.zip cpython-b62e8a8062ff81f0f5d80b25aa0fb6b2457c721c.tar.gz cpython-b62e8a8062ff81f0f5d80b25aa0fb6b2457c721c.tar.bz2 |
Two changes that are definitely problem-free and avoid calling print()
with a bytes instance (as this will soon print something differently).
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_xml_etree.py | 5 | ||||
-rw-r--r-- | Lib/test/test_xml_etree_c.py | 5 |
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 |