Beispiel #1
0
    def test_writing_and_reading_history(self):
        history_file = self.project.get_file('history.pickle')  # noqa
        self.project.set('save_history', True)
        history = rope.base.history.History(self.project)
        myfile = self.project.get_file('myfile.txt')
        history.do(rope.base.change.CreateResource(myfile))
        history.write()

        history = rope.base.history.History(self.project)
        history.undo()
        self.assertFalse(myfile.exists())
Beispiel #2
0
    def test_writing_and_reading_history(self):
        history_file = self.project.get_file('history.pickle')
        self.project.set('save_history', True)
        history = rope.base.history.History(self.project)
        myfile = self.project.get_file('myfile.txt')
        history.do(CreateResource(myfile))
        history.write()

        history = rope.base.history.History(self.project)
        history.undo()
        self.assertFalse(myfile.exists())
Beispiel #3
0
    def test_writing_and_reading_history(self):
        history_file = self.project.get_file("history.pickle")  # noqa
        self.project.set("save_history", True)
        history = rope.base.history.History(self.project)
        myfile = self.project.get_file("myfile.txt")
        history.do(rope.base.change.CreateResource(myfile))
        history.write()

        history = rope.base.history.History(self.project)
        history.undo()
        self.assertFalse(myfile.exists())
Beispiel #4
0
    def test_writing_and_reading_history2(self):
        history_file = self.project.get_file("history.pickle")  # noqa
        self.project.set("save_history", True)
        history = rope.base.history.History(self.project)
        myfile = self.project.get_file("myfile.txt")
        history.do(rope.base.change.CreateResource(myfile))
        history.undo()
        history.write()

        history = rope.base.history.History(self.project)
        history.redo()
        self.assertTrue(myfile.exists())