コード例 #1
0
ファイル: history_test.py プロジェクト: pombredanne/traad
 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)
コード例 #2
0
ファイル: history_test.py プロジェクト: pombredanne/traad
    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)
コード例 #3
0
ファイル: server.py プロジェクト: pombredanne/traad
def redo_info_view(idx):
    from traad.rope.history import redo_info
    return {
        'result': 'success',
        'info': redo_info(project, int(idx))
    }