()
| 447 | |
| 448 | |
| 449 | def test_pretty_max_seq_length(): |
| 450 | f = PlainTextFormatter(max_seq_length=1) |
| 451 | lis = list(range(3)) |
| 452 | text = f(lis) |
| 453 | assert text == "[0, ...]" |
| 454 | f.max_seq_length = 0 |
| 455 | text = f(lis) |
| 456 | assert text == "[0, 1, 2]" |
| 457 | text = f(list(range(1024))) |
| 458 | lines = text.splitlines() |
| 459 | assert len(lines) == 1024 |
| 460 | |
| 461 | |
| 462 | def test_ipython_display_formatter(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…