summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_minidom.py
diff options
context:
space:
mode:
authorLars Gustäbel <lars@gustaebel.de>2000-10-13 20:54:10 (GMT)
committerLars Gustäbel <lars@gustaebel.de>2000-10-13 20:54:10 (GMT)
commit5bad5a4be277920f10414cce238376275d40f32b (patch)
tree23ac8baf99416b5b22e8809d3f592e0b3f465ef9 /Lib/test/test_minidom.py
parentec964d5b21e9afcafbf9ab04240fa1240f70f965 (diff)
downloadcpython-5bad5a4be277920f10414cce238376275d40f32b.zip
cpython-5bad5a4be277920f10414cce238376275d40f32b.tar.gz
cpython-5bad5a4be277920f10414cce238376275d40f32b.tar.bz2
Updated test suite to latest pulldom changes.
Diffstat (limited to 'Lib/test/test_minidom.py')
-rw-r--r--Lib/test/test_minidom.py30
1 files changed, 15 insertions, 15 deletions
diff --git a/Lib/test/test_minidom.py b/Lib/test/test_minidom.py
index 5f0ab25..7afdf5d 100644
--- a/Lib/test/test_minidom.py
+++ b/Lib/test/test_minidom.py
@@ -337,21 +337,21 @@ def testParents():
doc.unlink()
-def testNonNSElements():
+def testSAX2DOM():
from xml.dom import pulldom
- pulldom = pulldom.PullDOM()
- pulldom.startDocument()
- pulldom.startElement("doc", {})
- pulldom.characters("text")
- pulldom.startElement("subelm", {})
- pulldom.characters("text")
- pulldom.endElement("subelm")
- pulldom.characters("text")
- pulldom.endElement("doc")
- pulldom.endDocument()
-
- doc = pulldom.document
+ sax2dom = pulldom.SAX2DOM()
+ sax2dom.startDocument()
+ sax2dom.startElement("doc", {})
+ sax2dom.characters("text")
+ sax2dom.startElement("subelm", {})
+ sax2dom.characters("text")
+ sax2dom.endElement("subelm")
+ sax2dom.characters("text")
+ sax2dom.endElement("doc")
+ sax2dom.endDocument()
+
+ doc = sax2dom.document
root = doc.documentElement
(text1, elm1, text2) = root.childNodes
text3 = elm1.childNodes[0]
@@ -363,13 +363,13 @@ def testNonNSElements():
text2.previousSibling is elm1 and
text2.nextSibling is None and
text3.previousSibling is None and
- text3.nextSibling is None, "testNonNSElements - siblings")
+ text3.nextSibling is None, "testSAX2DOM - siblings")
confirm(root.parentNode is doc and
text1.parentNode is root and
elm1.parentNode is root and
text2.parentNode is root and
- text3.parentNode is elm1, "testNonNSElements - parents")
+ text3.parentNode is elm1, "testSAX2DOM - parents")
doc.unlink()