Beispiel #1
0
 def testGetSomePosition(self):
    pos = get_position(3, 0, test_xml)
    self.assertEquals('<beans', test_xml[pos:pos+6]) 
    
    pos = get_position(3, 7, test_xml)
    self.assertEquals('xmlns', test_xml[pos:pos+5])
    
    pos = get_position(12, 5, test_xml)
    self.assertEquals('<aaa', test_xml[pos:pos+4])
    
    pos = get_position(12, 8, test_xml)
    self.assertEquals('a>', test_xml[pos:pos+2])
Beispiel #2
0
 def testGetZeroPosition(self):
     self.assertEquals(0, get_position(0, 0, test_xml))
     self.assertEquals(0, get_position(1, 0, test_xml))