예제 #1
0
 def test_should_return_offset(self):
     self.assertEqual(
         jedibackend.linecol_to_pos("foo\nbar\nbaz\nqux", 4, 2), 14)
예제 #2
0
 def test_should_handle_end_of_string(self):
     self.assertEqual(
         jedibackend.linecol_to_pos("foo\nbar\nbaz\nqux", 3, 1), 9)
예제 #3
0
 def test_should_handle_beginning_of_string(self):
     self.assertEqual(jedibackend.linecol_to_pos("foo", 1, 0), 0)
예제 #4
0
 def test_should_return_offset(self):
     self.assertEqual(jedibackend.linecol_to_pos("foo\nbar\nbaz\nqux",
                                                 4, 2),
                      14)
예제 #5
0
 def test_should_handle_end_of_string(self):
     self.assertEqual(jedibackend.linecol_to_pos("foo\nbar\nbaz\nqux",
                                                 3, 1),
                      9)
예제 #6
0
 def test_should_handle_beginning_of_string(self):
     self.assertEqual(jedibackend.linecol_to_pos("foo", 1, 0),
                      0)