5
:Contact: goodger@users.sourceforge.net
6
:Revision: $Revision: 1.1 $
7
:Date: $Date: 2002/07/18 01:39:17 $
8
:Copyright: This module has been placed in the public domain.
13
from __init__ import DocutilsTestSupport
16
s = DocutilsTestSupport.SimpleTableParserTestSuite()
17
s.generateTests(totest)
22
totest['simple_tables'] = [
24
============ ============
25
A table with two columns.
26
============ ============
30
[[(0, 0, 1, ['A table with']),
31
(0, 0, 1, ['two columns.'])]])],
33
============ ============
34
A table with two columns
36
============ ============
40
[[(0, 0, 1, ['A table with']),
41
(0, 0, 1, ['two columns'])],
43
(0, 0, 2, ['two rows.'])]])],
45
========== ===========
46
A table with four rows,
47
-----------------------
51
=======================
55
[[(0, 1, 1, ['A table with four rows,'])],
56
[(0, 0, 3, ['and two']),
57
(0, 0, 3, ['columns.'])],
58
[(0, 0, 4, ['First and']),
59
(0, 0, 4, ['last rows'])],
60
[(0, 1, 5, ['contain column spans.'])]])],
67
'TableMarkupError: Text in column margin at line offset 1.'],
69
=========== ================
70
A table with two header rows,
71
-----------------------------
72
the first with a span.
73
=========== ================
75
the second with a span.
76
=============================
79
[[(0, 1, 1, ['A table with two header rows,'])],
80
[(0, 0, 3, ['the first']),
81
(0, 0, 3, ['with a span.'])]],
82
[[(0, 0, 5, ['Two body']),
83
(0, 0, 5, ['rows,'])],
84
[(0, 1, 6, ['the second with a span.'])]])],
86
============ =============
87
A table with two head/body
88
============ =============
90
============ =============
92
============ =============
94
'TableMarkupError: Multiple head/body row separators in table '
95
'(at line offset 2 and 4); only one allowed.'],
99
if __name__ == '__main__':
101
unittest.main(defaultTest='suite')