def test_that_offset_is_ignored_if_line_break_present(self): self.assertEqual(mp.compute_position('a\ncd', 99), 3)
def test_that_pos_for_formula_on_first_line_correct(self): self.assertEqual(mp.compute_position('abc'), 4)
def test_that_pos_after_line_berak_is_correct(self): self.assertEqual(mp.compute_position('a\nb\ncd'), 3)
def test_that_position_for_formula_at_beginning_of_document_is_correct(self): self.assertEqual(mp.compute_position(''), 1) self.assertEqual(mp.compute_position('', 1), 1)