Conditions | 2 |
Total Lines | 48 |
Code Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | from unittest import TestCase |
||
18 | def test_table(self): |
||
19 | doc = TableTest.conversion( |
||
20 | """ |
||
21 | | Name | Details | |
||
22 | | --- | --- | |
||
23 | | Item1 | This text is on one line | |
||
24 | | | This item has:<br><br>- Multiple items<br>- That we want listed separately | |
||
25 | """, |
||
26 | ) |
||
27 | text = convert_text( |
||
28 | doc, |
||
29 | input_format="panflute", |
||
30 | output_format="markdown", |
||
31 | ) |
||
32 | |||
33 | if version < (3, 6, 4): |
||
34 | self.assertEqual( |
||
35 | text, |
||
36 | """ |
||
37 | +-----------------------------------+-----------------------------------+ |
||
38 | | Name | Details | |
||
39 | +===================================+===================================+ |
||
40 | | Item1 | This text is on one line | |
||
41 | +-----------------------------------+-----------------------------------+ |
||
42 | | | This item has: | |
||
43 | | | | |
||
44 | | | - Multiple items | |
||
45 | | | - That we want listed | |
||
46 | | | separately | |
||
47 | +-----------------------------------+-----------------------------------+ |
||
48 | """.strip() |
||
49 | ) |
||
50 | |||
51 | else: |
||
52 | self.assertEqual( |
||
53 | text, |
||
54 | """ |
||
55 | +-----------------------------------+-----------------------------------+ |
||
56 | | Name | Details | |
||
57 | +===================================+===================================+ |
||
58 | | Item1 | This text is on one line | |
||
59 | +-----------------------------------+-----------------------------------+ |
||
60 | | | This item has: | |
||
61 | | | | |
||
62 | | | - Multiple items | |
||
63 | | | - That we want listed separately | |
||
64 | +-----------------------------------+-----------------------------------+ |
||
65 | """.strip() |
||
66 | ) |
||
67 |