def test_core_properties(self):
     csv = any_tableset(horror_fobj('simple.csv'), extension="csv")
     for table in csv.tables:
         for row in table:
             for cell in row:
                 cell.properties  # vague existence
                 assert_false('anything' in cell.properties)
 def test_core_properties(self):
     csv = any_tableset(horror_fobj('simple.csv'), extension="csv")
     for table in csv.tables:
         for row in table:
             for cell in row:
                 cell.properties  # vague existence
                 assert_false('anything' in cell.properties)
    def test_repr_ascii_not_unicode(self):
        """
        __repr__ must return a str (not unicode), see object.__repr__(self) in
        http://docs.python.org/2/reference/datamodel.html
        """
        fh = horror_fobj('unicode_sheet_name.xls')
        table_set = any_tableset(fh, extension='xls')

        x = repr(table_set.tables)
        self.assertTrue(isinstance(x, str))
 def setUpClass(cls):
     cls.xls = any_tableset(horror_fobj('excel_properties.xls'),
                            extension='xls')
     rows = list(cls.xls.tables)[0]
     cls.first_cells = [list(row)[0] for row in rows]
     cls.properties = [x.properties for x in cls.first_cells]
 def setUpClass(cls):
     cls.xls = any_tableset(horror_fobj('span_rich.xls'), extension='xls')
     cls.table = list(list(cls.xls.tables)[0])
 def setUpClass(cls):
     cls.html = any_tableset(horror_fobj('rowcolspan.html'),
                             extension="html")
     first_row = list(list(cls.html.tables)[0])[0]
     cls.real_cell = first_row[1]
 def setUp(self):
     self.html = any_tableset(horror_fobj("badcolspan.html"),
                              extension="html")
 def setUp(self):
     self.html = any_tableset(horror_fobj("badcolspan.html"),
                              extension="html")
 def setUpClass(cls):
     cls.html = any_tableset(horror_fobj('rowcolspan.html'),
                             extension="html")
     cls.first_row = list(list(cls.html.tables)[0])[0]
     cls.real_cell = cls.first_row[1]
     cls.fake_cell = cls.first_row[2]
Exemple #10
0
 def setUp(self):
     fh = horror_fobj('simple.xls')
     self.table_set = any_tableset(fh, extension='xls')
 def setUpClass(cls):
     cls.xls = any_tableset(horror_fobj('excel_properties.xls'), extension='xls')
     rows = list(cls.xls.tables)[0]
     cls.first_cells = [list(row)[0] for row in rows]
     cls.properties = [x.properties for x in cls.first_cells]
 def setUpClass(cls):
     cls.xls = any_tableset(horror_fobj('span_rich.xls'), extension='xls')
     cls.table = list(list(cls.xls.tables)[0])
Exemple #13
0
    def test_get_item(self):
        fh = horror_fobj('simple.xls')
        table_set = any_tableset(fh, extension='xls')

        self.assertTrue(isinstance(table_set['simple.csv'], RowSet))
        self.assertRaises(KeyError, lambda: table_set['non-existent'])