def test_1_TaskCSV(self): mytask=task.MyTask('my task') mytask.restart() time.sleep(2) mytask.stop() out=task.csvTaskFormatter(mytask) print out self.assertTrue(out.find('my task')>-1)
def test_1_TaskCSV(self): mytask = task.MyTask('my task') mytask.restart() time.sleep(2) mytask.stop() out = task.csvTaskFormatter(mytask) print out self.assertTrue(out.find('my task') > -1)
def test_2_TaskCSV(self): mytaskList=task.MyTaskList() mytaskList.append('task 1') mytaskList.current.stop() mytaskList.append('task 2') mytaskList.current.stop() out=task.csvTaskFormatter(mytaskList) print out self.assertTrue(((out.find('task 1')>-1) and (out.find('task 2')>-1)))
def test_2_TaskCSV(self): mytaskList = task.MyTaskList() mytaskList.append('task 1') mytaskList.current.stop() mytaskList.append('task 2') mytaskList.current.stop() out = task.csvTaskFormatter(mytaskList) print out self.assertTrue(((out.find('task 1') > -1) and (out.find('task 2') > -1)))
def OnSave(self, event): csvtask = file.CSVTask() if self.tasklist != None: dialog = wx.FileDialog(None, style=wx.SAVE | wx.OVERWRITE_PROMPT) if dialog.ShowModal() == wx.ID_OK: csvtask.filename = dialog.GetPath() csvtask.write(task.csvTaskFormatter(self.tasklist)) self.tosave = False # Destroy the dialog dialog.Destroy()