Esempio n. 1
0
 def test_undo_info(self):
     rename(self.proj, self.task_state,
            'Llama',
            'basic/foo.py',
            8)
     i = history.undo_info(self.proj, 0)
     for k in ['description', 'time', 'full_change', 'changes']:
         self.assertIn(k, i)
Esempio n. 2
0
    def test_undo_info_exceptions(self):
        with self.assertRaises(IndexError):
            history.undo_info(self.proj, 0)

        rename(self.proj, self.task_state,
               'Llama',
               'basic/foo.py',
               8)
        history.undo_info(self.proj, 0)
        with self.assertRaises(IndexError):
            history.undo_info(self.proj, 1)
Esempio n. 3
0
def undo_info_view(idx):
    from traad.rope.history import undo_info
    return {
        'result': 'success',
        'info': undo_info(project, int(idx))
    }