MCPcopy Create free account
hub / github.com/ipython/ipython / test_pretty_max_seq_length

Function test_pretty_max_seq_length

IPython/core/tests/test_formatters.py:379–389  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

377 nt.assert_equal(captured.stderr, "")
378
379def test_pretty_max_seq_length():
380 f = PlainTextFormatter(max_seq_length=1)
381 lis = list(range(3))
382 text = f(lis)
383 nt.assert_equal(text, '[0, ...]')
384 f.max_seq_length = 0
385 text = f(lis)
386 nt.assert_equal(text, '[0, 1, 2]')
387 text = f(list(range(1024)))
388 lines = text.splitlines()
389 nt.assert_equal(len(lines), 1024)
390
391
392def test_ipython_display_formatter():

Callers

nothing calls this directly

Calls 2

PlainTextFormatterClass · 0.90
fFunction · 0.70

Tested by

no test coverage detected