def testSpreadsheet(self): table = [ [ 'XPos', 'YPos' ], [ '1', '2' ], [ '3', '4' ] ] filename = '/tmp/spreadsheet.csv' writeSpreadsheet(filename, table) table2 = readSpreadsheet(filename) print table2 self.assertEqual(table, table2) os.remove(filename)
def testSpreadsheet(self): table = [['XPos', 'YPos'], ['1', '2'], ['3', '4']] filename = '/tmp/spreadsheet.csv' writeSpreadsheet(filename, table) table2 = readSpreadsheet(filename) print table2 self.assertEqual(table, table2) os.remove(filename)
def loadTableScan(filename, pre=None, post=None, start=None, stop=None): """Load table from spreadsheet file :param filename: File name, either '*.cvs', '*.tab', '*.xls' or '*.gnumeric' :param pre: Command or list of commands executed at the start of the table. :param post: Command or list of commands executed at the end of the table. :param start: Command or list of commands executed to start each 'Wait For'. :param stop: Command or list of commands executed at the end of each 'Wait For'. """ table = readSpreadsheet(filename) headers = table[0] rows = table[1:] return TableScan(headers, rows, pre, post, start, stop)