1.1 --- a/tests/test_table.py Thu Feb 23 23:47:36 2012 +0100
1.2 +++ b/tests/test_table.py Fri Feb 24 21:39:12 2012 +0100
1.3 @@ -25,6 +25,13 @@
1.4 Some preformatted text.
1.5 \\}\\}\\}
1.6 ||<colspan="2"> Preformatted text in a separate section
1.7 +==
1.8 +== Heading 2 ==
1.9 +This is in the first column.
1.10 +|| And this is in the second.
1.11 +== This, despite the == is in a new row.
1.12 +||
1.13 +And this is the second column.
1.14 """
1.15
1.16 attrs, rows = parse(table)
1.17 @@ -32,12 +39,19 @@
1.18 print table
1.19 print attrs
1.20 print rows
1.21 -print len(rows) == 6, ": length is", len(rows), "==", 6
1.22 +print len(rows) == 8, ": length is", len(rows), "==", 8
1.23 print
1.24 -for (row_attrs, columns), expected in zip(rows, [3, 2, 3, 3, 3, 2]):
1.25 +for (row_attrs, columns), expected in zip(rows, [3, 2, 3, 3, 3, 2, 2, 2]):
1.26 print row_attrs
1.27 print columns
1.28 - print len(columns) == expected, ": length is", len(columns), "==", expected
1.29 + non_continuation_columns = [
1.30 + (column_attrs, content)
1.31 + for (column_attrs, content) in columns
1.32 + if not column_attrs.has_key("colcontinuation")
1.33 + and not column_attrs.has_key("rowcontinuation")
1.34 + and not content is None
1.35 + ]
1.36 + print len(non_continuation_columns) == expected, ": length is", len(non_continuation_columns), "==", expected
1.37 print
1.38
1.39 # vim: tabstop=4 expandtab shiftwidth=4