MCPcopy Create free account
hub / github.com/python-cmd2/cmd2 / test_history_max_length

Function test_history_max_length

tests/test_history.py:326–330  ·  view source on GitHub ↗
(hist)

Source from the content-addressed store, hash-verified

324
325
326def test_history_max_length(hist) -> None:
327 hist.truncate(2)
328 assert len(hist) == 2
329 assert hist.get(1).statement.raw == "third"
330 assert hist.get(2).statement.raw == "fourth"
331
332
333def test_history_to_json(hist) -> None:

Callers

nothing calls this directly

Calls 2

truncateMethod · 0.80
getMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…