def testRowsCells (self): suffix = u'' dlg = TableDialog (self.wnd) controller = TableDialogController (dlg, suffix, self._application.config) dlg.colsCount = 5 dlg.rowsCount = 3 Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = u'''(:table border="1":) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:tableend:)''' self.assertEqual (result, validResult, result)
def testColsCount (self): dlg = TableDialog (self.wnd) Tester.dialogTester.appendOk() controller = TableDialogController (dlg, self._application.config) dlg.colsCount = 10 controller.showDialog() dlg2 = TableDialog (self.wnd) controller2 = TableDialogController (dlg2, self._application.config) self.assertEqual (dlg2.colsCount, 10) Tester.dialogTester.appendOk() controller2.showDialog()
def testColsCount(self): suffix = '' dlg = TableDialog(self.mainWindow) Tester.dialogTester.appendOk() controller = TableDialogController(dlg, suffix, self.application.config) dlg.colsCount = 10 controller.showDialog() dlg2 = TableDialog(self.mainWindow) controller2 = TableDialogController(dlg2, suffix, self.application.config) self.assertEqual(dlg2.colsCount, 10) Tester.dialogTester.appendOk() controller2.showDialog()
def testColsCount(self): suffix = '' dlg = TableDialog(self.mainWindow) Tester.dialogTester.appendOk() controller = TableDialogController(dlg, suffix, self.application.config) dlg.colsCount = 10 controller.showDialog() dlg2 = TableDialog(self.mainWindow) controller2 = TableDialogController(dlg2, suffix, self.application.config) self.assertEqual(dlg2.colsCount, 10) Tester.dialogTester.appendOk() controller2.showDialog()
def testCells (self): dlg = TableDialog (self.wnd) controller = TableDialogController (dlg, self._application.config) dlg.colsCount = 5 Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = u'''<table border="1"> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </table>''' self.assertEqual (result, validResult, result)
def testHCells(self): dlg = TableDialog(self.mainWindow) controller = TableDialogController(dlg, self.application.config) dlg.colsCount = 5 dlg.rowsCount = 3 dlg.headerCells = True Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = '''<table border="1"> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </table>''' self.assertEqual(result, validResult, result)
def testHCells(self): suffix = '' dlg = TableDialog(self.mainWindow) controller = TableDialogController(dlg, suffix, self.application.config) dlg.colsCount = 5 dlg.rowsCount = 3 dlg.headerCells = True Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = '''(:table border="1":) (:row:) (:hcell:) (:hcell:) (:hcell:) (:hcell:) (:hcell:) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:tableend:)''' self.assertEqual(result, validResult, result)
def testHCells(self): dlg = TableDialog(self.mainWindow) controller = TableDialogController(dlg, self.application.config) dlg.colsCount = 5 dlg.rowsCount = 3 dlg.headerCells = True Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = '''<table border="1"> <tr> <th></th> <th></th> <th></th> <th></th> <th></th> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> </table>''' self.assertEqual(result, validResult, result)
def testCells(self): suffix = u'' dlg = TableDialog(self.wnd) controller = TableDialogController(dlg, suffix, self._application.config) dlg.colsCount = 5 Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = u'''(:table border="1":) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:tableend:)''' self.assertEqual(result, validResult, result)
def testHCells(self): suffix = '' dlg = TableDialog(self.mainWindow) controller = TableDialogController(dlg, suffix, self.application.config) dlg.colsCount = 5 dlg.rowsCount = 3 dlg.headerCells = True Tester.dialogTester.appendOk() controller.showDialog() result = controller.getResult() validResult = '''(:table border="1":) (:row:) (:hcell:) (:hcell:) (:hcell:) (:hcell:) (:hcell:) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:row:) (:cell:) (:cell:) (:cell:) (:cell:) (:cell:) (:tableend:)''' self.assertEqual(result, validResult, result)