Ignore:
Timestamp:
08/22/10 08:12:17 (3 years ago)
Author:
Aurélien Bompard <aurelien@…>
Branches:
master
Children:
70e8239
Parents:
9f3bf0d
git-author:
Aurélien Bompard <aurelien@…> (08/22/10 08:12:17)
git-committer:
Aurélien Bompard <aurelien@…> (08/22/10 08:12:17)
Message:

Table header styles can only be on the first line

File:
1 edited

Legend:

Unmodified
Added
Removed
  • tests/test_tables.py

    r9f3bf0d re5ae7b4  
    487487                             </table:table> \s* 
    488488                             """, str(odt), re.X) 
     489 
     490    def test_table_th_not_on_first_line(self): 
     491        html = """<html xmlns="http://www.w3.org/1999/xhtml"> 
     492            <table> 
     493              <tr> 
     494                <td>Cell1</td> 
     495                <td>Cell2</td> 
     496              </tr> 
     497              <tr> 
     498                <th>Cell3</th> 
     499                <td>Cell4</td> 
     500              </tr> 
     501            </table> 
     502        </html> 
     503        """ 
     504        odt = xhtml2odt(html) 
     505        # remove namespaces 
     506        odt = re.sub('(xmlns:[a-z0-9=:".-]+\s+)*', '', str(odt)) 
     507        # remove comments 
     508        odt = re.sub('(<!--[a-z0-9=-]+-->)*', '', odt) 
     509        print odt 
     510        self.assertEquals(str(odt).count("table-default.cell-H"), 0, 
     511                          "Table header styles can only be on the first line") 
    489512 
    490513    def test_table_header_text_style(self): 
Note: See TracChangeset for help on using the changeset viewer.