Output: plain with multiline cells and empty cells with headers
()
| 73 | |
| 74 | |
| 75 | def test_plain_multiline_with_empty_cells(): |
| 76 | "Output: plain with multiline cells and empty cells with headers" |
| 77 | table = [ |
| 78 | ["hdr", "data", "fold"], |
| 79 | ["1", "", ""], |
| 80 | ["2", "very long data", "fold\nthis"], |
| 81 | ] |
| 82 | expected = "\n".join( |
| 83 | [ |
| 84 | " hdr data fold", |
| 85 | " 1", |
| 86 | " 2 very long data fold", |
| 87 | " this", |
| 88 | ] |
| 89 | ) |
| 90 | result = tabulate(table, headers="firstrow", tablefmt="plain") |
| 91 | assert_equal(expected, result) |
| 92 | |
| 93 | |
| 94 | def test_plain_multiline_with_empty_cells_headerless(): |
nothing calls this directly
no test coverage detected