def testTableScan(self): table = TableScan(['XPos', 'YPos'], [['1', '2'], ['3', '4']]) filename = '/tmp/spreadsheet.csv' table.save(filename) table2 = loadTableScan(filename) print table self.assertEqual(table.headers, table2.headers) self.assertEqual(table.rows, table2.rows) os.remove(filename)
def testTableScan(self): table = TableScan([ 'XPos', 'YPos' ], [ [ '1', '2' ], [ '3', '4' ] ] ) filename = '/tmp/spreadsheet.csv' table.save(filename) table2 = loadTableScan(filename) print table self.assertEqual(table.headers, table2.headers) self.assertEqual(table.rows, table2.rows) os.remove(filename)
def getTableFromPath(path): path = FileUtil.workspacePathToSysPath(path) if path: return loadTableScan(path) else: raise Exception("No file to load")