def testRead(self): mockApp = mock.App() start = time.time() mockApp.iocontroller.open(self.taskfilename) end = time.time() self.assertEqual(self.nrTasks, len(mockApp.taskFile.tasks())) self.failUnless(end - start < self.nrTasks / 10) mockApp.quitApplication()
def testRead(self): mockApp = mock.App() start = time.time() mockApp.io.open(self.taskfilename) end = time.time() self.assertEqual(self.nrTasks, len(mockApp.taskFile.tasks())) self.failUnless(end-start < self.nrTasks/10) mockApp.mainwindow.quit()
def testSaveAndMerge(self): mockApp2 = mock.App() mockApp2.addTasks() mockApp2.iocontroller.saveas(self.filename2) self.mockApp.iocontroller.merge(self.filename2) self.assertTasksLoaded(4) self.mockApp.iocontroller.saveas(self.filename) mockApp2.quitApplication()
def testSaveAndMerge(self): mockApp2 = mock.App() mockApp2.addTasks() mockApp2.io.saveas(self.filename2) self.mockApp.io.merge(self.filename2) self.assertTasksLoaded(4) self.mockApp.io.saveas(self.filename) mockApp2.mainwindow.quit()
def setUp(self): super(TaskViewerAndCategoryFilterIntegrationTestFixture, self).setUp() self.app = mock.App() parent = task.Task('parent') child = task.Task('child') parent.addChild(child) self.category = category.Category('category') self.app.mainwindow.taskFile.categories().append(self.category) self.app.mainwindow.taskFile.tasks().extend([parent, child]) self.category.addCategorizable(child) self.category.setFiltered() self.taskViewer = self.app.mainwindow.viewer[0]
def setUp(self): self.filename = 'LoadTest.tsk' taskfile = file(self.filename, 'w') taskfile.writelines(['Line 1\n', 'Line 2\n']) taskfile.close() self.errorDialogCalled = False self.mockApp = mock.App() # On MacOS, wx.Yield doesn't seem to be enough, so while # running the tests, just short-circuit this: self.oldCallAfter = wx.CallAfter # pylint: disable=W0142 wx.CallAfter = lambda func, *args, **kwargs: func(*args, **kwargs)
def setUp(self): self.mockApp = mock.App() self.mockApp.addTask()
def setUp(self): self.filename = 'SaveTest.tsk' self.filename2 = 'SaveTest2.tsk' self.mockApp = mock.App() self.mockApp.addTasks()