Example #1
0
 def test_redo_info(self):
     rename(self.proj, self.task_state,
            'Llama',
            'basic/foo.py',
            8)
     history.undo(self.proj)
     i = history.redo_info(self.proj, 0)
     for k in ['description', 'time', 'full_change', 'changes']:
         self.assertIn(k, i)
Example #2
0
    def test_redo_info_exceptions(self):
        with self.assertRaises(IndexError):
            history.redo_info(self.proj, 0)

        rename(self.proj, self.task_state,
               'Llama',
               'basic/foo.py',
               8)
        history.undo(self.proj)

        history.redo_info(self.proj, 0)

        with self.assertRaises(IndexError):
            history.redo_info(self.proj, 1)
Example #3
0
def redo_info_view(idx):
    from traad.rope.history import redo_info
    return {
        'result': 'success',
        'info': redo_info(project, int(idx))
    }