Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
863a0c3f
Kaydet (Commit)
863a0c3f
authored
Mar 02, 2011
tarafından
Benjamin Peterson
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
add tests for xml.pulldom #9373
Thanks to Mark Smith for the patch.
üst
8eda5f7c
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
38 deletions
+2
-38
test_minidom.py
Lib/test/test_minidom.py
+1
-38
test_pulldom.py
Lib/test/test_pulldom.py
+0
-0
ACKS
Misc/ACKS
+1
-0
No files found.
Lib/test/test_minidom.py
Dosyayı görüntüle @
863a0c3f
...
...
@@ -4,9 +4,7 @@ import pickle
from
test.support
import
verbose
,
run_unittest
,
findfile
import
unittest
import
xml.dom
import
xml.dom.minidom
import
xml.parsers.expat
from
xml.dom.minidom
import
parse
,
Node
,
Document
,
parseString
from
xml.dom.minidom
import
getDOMImplementation
...
...
@@ -14,7 +12,6 @@ from xml.dom.minidom import getDOMImplementation
tstfile
=
findfile
(
"test.xml"
,
subdir
=
"xmltestdata"
)
# The tests of DocumentType importing use these helpers to construct
# the documents to work with, since not all DOM builders actually
# create the DocumentType nodes.
...
...
@@ -1009,41 +1006,6 @@ class MinidomTest(unittest.TestCase):
"test NodeList.item()"
)
doc
.
unlink
()
def
testSAX2DOM
(
self
):
from
xml.dom
import
pulldom
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
]
self
.
confirm
(
text1
.
previousSibling
is
None
and
text1
.
nextSibling
is
elm1
and
elm1
.
previousSibling
is
text1
and
elm1
.
nextSibling
is
text2
and
text2
.
previousSibling
is
elm1
and
text2
.
nextSibling
is
None
and
text3
.
previousSibling
is
None
and
text3
.
nextSibling
is
None
,
"testSAX2DOM - siblings"
)
self
.
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
,
"testSAX2DOM - parents"
)
doc
.
unlink
()
def
testEncodings
(
self
):
doc
=
parseString
(
'<foo>€</foo>'
)
self
.
assertEqual
(
doc
.
toxml
(),
...
...
@@ -1490,6 +1452,7 @@ class MinidomTest(unittest.TestCase):
doc
.
appendChild
(
doc
.
createComment
(
"foo--bar"
))
self
.
assertRaises
(
ValueError
,
doc
.
toxml
)
def
testEmptyXMLNSValue
(
self
):
doc
=
parseString
(
"<element xmlns=''>
\n
"
"<foo/>
\n
</element>"
)
...
...
Lib/test/test_pulldom.py
0 → 100644
Dosyayı görüntüle @
863a0c3f
This diff is collapsed.
Click to expand it.
Misc/ACKS
Dosyayı görüntüle @
863a0c3f
...
...
@@ -796,6 +796,7 @@ Kragen Sitaker
Eric V. Smith
Christopher Smith
Gregory P. Smith
Mark Smith
Rafal Smotrzyk
Dirk Soede
Paul Sokolovsky
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment