def process(self): """The process we'll be testing against. If it hasn't been initialized yet, we'll do that with the standard arguments as specified upon instantiation, or default to .defaultArgs.""" if not self.processInitialized: dprint("MAKING NEW PROCESS") self.initProcess(self.argsToRun()) return self._process
def runModules(types, modules): # NOTE: As a result of design flaws in some of the code in this module, # we have to iterate through lists in 'modules'. A much better approach # would be to make the 'Tests' class alterable, design it with # filters and work with that here. dprint("types:", types, "modules", modules) testTypeIndex = 0 for testType in types: for module in modules[testTypeIndex]: runModule(testType, module) testTypeIndex += 1
def _runOneFileTest(self, filePair): from lib.pmwiki2md import AllConversions as Conversions, Content as Content conversions = Conversions() pmwikiFilePath = os.path.join(self.pmwikiConversionsBaseDir, "testTest.pmwiki") mdFilePath = self.getMatchingMdFilePathForPmwikiFilePath( pmwikiFilePath) testFilePair = TestFilePair(pmwikiFilePath, mdFilePath) dprint("testFilePair", testFilePair.pmwikiFilePath, testFilePair.mdFilePath) return self.assertEqual( conversions.convert(Content(testFilePair.pmwiki)).string, testFilePair.md)
def test_addRowAndCell(self): """ Tests adding one Row with one Cell.""" from lib.table import Table, Row, Cell cell = Cell() row = Row() table = Table() table.test = "addRowAndCellTest" cell.text = "Test" row.addCell(cell) table.addRow( row) #NOTE: BUG found: does something to trip up tableHasRows. textFoundInTableCell = table.rows[0].cells[0].text self.assertEqual(textFoundInTableCell, "Test") dprint("Table address:", table)