[Python-3000-checkins] r58412 - python/branches/py3k/Lib/test/test_xml_etree.py python/branches/py3k/Lib/test/test_xml_etree_c.py

guido.van.rossum python-3000-checkins at python.org
Thu Oct 11 00:48:24 CEST 2007


Author: guido.van.rossum
Date: Thu Oct 11 00:48:24 2007
New Revision: 58412

Modified:
   python/branches/py3k/Lib/test/test_xml_etree.py
   python/branches/py3k/Lib/test/test_xml_etree_c.py
Log:
Two changes that are definitely problem-free and avoid calling print()
with a bytes instance (as this will soon print something differently).


Modified: python/branches/py3k/Lib/test/test_xml_etree.py
==============================================================================
--- python/branches/py3k/Lib/test/test_xml_etree.py	(original)
+++ python/branches/py3k/Lib/test/test_xml_etree.py	Thu Oct 11 00:48:24 2007
@@ -183,9 +183,8 @@
     <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

Modified: python/branches/py3k/Lib/test/test_xml_etree_c.py
==============================================================================
--- python/branches/py3k/Lib/test/test_xml_etree_c.py	(original)
+++ python/branches/py3k/Lib/test/test_xml_etree_c.py	Thu Oct 11 00:48:24 2007
@@ -175,9 +175,8 @@
     <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


More information about the Python-3000-checkins mailing list