comparison emeraldtree/tests/test_tree.py @ 67:47b1c1aa1a2b

Tests for Tree - Use node write support
author Bastian Blank <bblank@thinkmo.de>
date Sun, 30 May 2010 17:28:59 +0200
parents 354ac088cd8d
children 2175b8941596
comparison
equal deleted inserted replaced
66:048d2f8de762 67:47b1c1aa1a2b
2 from emeraldtree.tree import * 2 from emeraldtree.tree import *
3 3
4 def serialize(elem, namespaces={}): 4 def serialize(elem, namespaces={}):
5 from StringIO import StringIO 5 from StringIO import StringIO
6 file = StringIO() 6 file = StringIO()
7 XMLWriter(namespaces=namespaces).write(file.write, elem) 7 elem.write(file.write, namespaces=namespaces)
8 return file.getvalue() 8 return file.getvalue()
9 9
10 def test_Element(): 10 def test_Element():
11 elem = Element(u'a') 11 elem = Element(u'a')
12 12