summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2000-10-06 22:42:55 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2000-10-06 22:42:55 (GMT)
commit0a84a338f9fb578303eb4341dbf0e8514dafe7e0 (patch)
tree2cae7c2267d938cdb01e8833911c97819a8d4e9f /Lib
parent2c8a89cc3f141f574982b66383c533e7ecbe4aac (diff)
downloadcpython-0a84a338f9fb578303eb4341dbf0e8514dafe7e0.zip
cpython-0a84a338f9fb578303eb4341dbf0e8514dafe7e0.tar.gz
cpython-0a84a338f9fb578303eb4341dbf0e8514dafe7e0.tar.bz2
Add .toxml test case, as proposed by Alex Martelli in bug report #116244.
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/output/test_minidom1
-rw-r--r--Lib/test/test_minidom.py7
2 files changed, 7 insertions, 1 deletions
diff --git a/Lib/test/output/test_minidom b/Lib/test/output/test_minidom
index 2a69827..2fa4032 100644
--- a/Lib/test/output/test_minidom
+++ b/Lib/test/output/test_minidom
@@ -103,5 +103,6 @@ Test Succeeded testTooManyDocumentElements
Passed Test
Test Succeeded testUnlink
Test Succeeded testWriteText
+Passed Test
Test Succeeded testWriteXML
All tests succeeded
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 52bd5c7..d9fee5b 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -246,7 +246,12 @@ def testAttributeRepr():
def testTextNodeRepr(): pass
-def testWriteXML(): pass
+def testWriteXML():
+ str = '<a b="c"/>'
+ dom = parseString(str)
+ domstr = dom.toxml()
+ dom.unlink()
+ confirm(str == domstr)
def testProcessingInstruction(): pass