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