Exemplo n.º 1
0
 def assertIndex(self, text, point, expected_index):
     """
     Assert that the given point resolves to the expected_index.
     """
     citer = Citer()
     actual = citer.pointToIndex(text, point)
     self.assertEqual(actual, expected_index,
         u"Expected point {point} to"
         u" be converted to index {expected_index} but it was {actual}"
         u"\n\n{text!r}".format(**locals()).encode('utf-8'))