Output: maxcolwidth, if only partly specified, pads tailing cols with None
()
| 176 | |
| 177 | |
| 178 | def test_maxcolwidth_pad_tailing_widths(): |
| 179 | "Output: maxcolwidth, if only partly specified, pads tailing cols with None" |
| 180 | table = [ |
| 181 | ["hdr", "fold1", "fold2"], |
| 182 | ["mini", "this is short", "this is a bit longer"], |
| 183 | ] |
| 184 | expected = "\n".join( |
| 185 | [ |
| 186 | "hdr fold1 fold2", |
| 187 | "mini this this is a bit longer", |
| 188 | " is", |
| 189 | " short", |
| 190 | ] |
| 191 | ) |
| 192 | result = tabulate( |
| 193 | table, headers="firstrow", tablefmt="plain", maxcolwidths=[None, 6] |
| 194 | ) |
| 195 | assert_equal(expected, result) |
| 196 | |
| 197 | |
| 198 | def test_maxcolwidth_honor_disable_parsenum(): |
nothing calls this directly
no test coverage detected