Skip to content

Commit

Permalink
[svn r3984] r4817@delle: sbehnel | 2008-10-18 21:34:58 +0200
Browse files Browse the repository at this point in the history
 test fixes for libxml2 2.7

--HG--
branch : trunk
  • Loading branch information
scoder committed Oct 18, 2008
1 parent 1b0c1d8 commit 5666ce6
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion samples/simple-ns.xml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<root xmlns='namespace'>
<root xmlns='http://namespace/'>
<element key='value'>text</element>
<element>text</element>tail
<empty-element/>
Expand Down
30 changes: 15 additions & 15 deletions selftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,13 @@ def parsefile():
>>> tree = ElementTree.parse("samples/simple-ns.xml")
>>> normalize_crlf(tree)
>>> tree.write(sys.stdout)
<root xmlns="namespace">
<root xmlns="http://namespace/">
<element key="value">text</element>
<element>text</element>tail
<empty-element/>
</root>
## <ns0:root xmlns:ns0="namespace">
## <ns0:root xmlns:ns0="http://namespace/">
## <ns0:element key="value">text</ns0:element>
## <ns0:element>text</ns0:element>tail
## <ns0:empty-element/>
Expand Down Expand Up @@ -412,10 +412,10 @@ def iterparse():
>>> context = iterparse("samples/simple-ns.xml")
>>> for action, elem in context:
... print("%s %s" % (action, elem.tag))
end {namespace}element
end {namespace}element
end {namespace}empty-element
end {namespace}root
end {http://namespace/}element
end {http://namespace/}element
end {http://namespace/}empty-element
end {http://namespace/}root
>>> events = ()
>>> context = iterparse("samples/simple.xml", events)
Expand Down Expand Up @@ -447,15 +447,15 @@ def iterparse():
... print("%s %s" % (action, elem.tag))
... else:
... print("%s %s" % (action, elem))
start-ns ('', 'namespace')
start {namespace}root
start {namespace}element
end {namespace}element
start {namespace}element
end {namespace}element
start {namespace}empty-element
end {namespace}empty-element
end {namespace}root
start-ns ('', 'http://namespace/')
start {http://namespace/}root
start {http://namespace/}element
end {http://namespace/}element
start {http://namespace/}element
end {http://namespace/}element
start {http://namespace/}empty-element
end {http://namespace/}empty-element
end {http://namespace/}root
end-ns None
"""
Expand Down
2 changes: 1 addition & 1 deletion selftest2.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ def parsefile():
</root>
>>> tree = ElementTree.parse(open("samples/simple-ns.xml", "rb"))
>>> tree.write(sys.stdout)
<root xmlns="namespace">
<root xmlns="http://namespace/">
<element key="value">text</element>
<element>text</element>tail
<empty-element/>
Expand Down

0 comments on commit 5666ce6

Please sign in to comment.