Source

Pyces / test / test_etree.py

Full commit
from unittest import TestCase
from pyces import etree

class SimpleTest( TestCase ):
    def setUp( self ):
        etree.initialize()
    def tearDown( self ):
        etree.terminate()
    def test_fromstring( self ):
        root = etree.fromstring( "<abc>32</abc>" )
        self.assertEquals( root.tag,
                           "abc" )
        self.assertEquals( root.text,
                           "32" )